Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(neon_http_client): add csrf interceptor #2300

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

Leptopoda
Copy link
Member

The coverage is a bit different from the one reported by the flutter_test package, as they both use different coverage collectors.

Let's hope it won't be too off from the current one

@Leptopoda Leptopoda requested a review from provokateurin July 22, 2024 07:13
@Leptopoda Leptopoda force-pushed the feat/neon_http_client/csrf_interceptor branch from a34d1e8 to 447c515 Compare July 22, 2024 08:19
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.74%. Comparing base (bc87322) to head (27c5f57).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2300      +/-   ##
==========================================
+ Coverage   28.93%   29.74%   +0.81%     
==========================================
  Files         275      293      +18     
  Lines      108625   117527    +8902     
==========================================
+ Hits        31428    34960    +3532     
- Misses      77197    82567    +5370     
Flag Coverage Δ *Carryforward flag
cookie_store 100.00% <ø> (ø) Carriedforward from bc87322
dynamite 31.08% <ø> (ø) Carriedforward from bc87322
dynamite_end_to_end_test 60.96% <ø> (ø) Carriedforward from bc87322
dynamite_runtime 85.40% <ø> (ø) Carriedforward from bc87322
neon_dashboard 96.20% <ø> (ø)
neon_framework 45.85% <100.00%> (+0.02%) ⬆️
neon_http_client 93.95% <100.00%> (-6.05%) ⬇️
neon_notifications 100.00% <ø> (ø)
neon_talk 99.45% <ø> (+0.98%) ⬆️
nextcloud 26.64% <ø> (+1.17%) ⬆️
sort_box 90.90% <ø> (ø) Carriedforward from bc87322

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...n_framework/lib/src/blocs/login_check_account.dart 0.00% <ø> (ø)
...ework/lib/src/blocs/login_check_server_status.dart 0.00% <ø> (ø)
...kages/neon_framework/lib/src/blocs/login_flow.dart 0.00% <ø> (ø)
...ackages/neon_framework/lib/src/models/account.dart 91.66% <100.00%> (+0.14%) ⬆️
.../neon_framework/lib/src/utils/request_manager.dart 78.75% <100.00%> (+0.43%) ⬆️
..._client/lib/src/interceptors/csrf_interceptor.dart 100.00% <100.00%> (ø)
...ges/neon_http_client/lib/src/neon_http_client.dart 96.00% <100.00%> (-4.00%) ⬇️

... and 39 files with indirect coverage changes

@provokateurin
Copy link
Member

Wasn't there a reason why we used flutter for running tests to collect coverage? I remember something wasn't working, but can't find the PR anymore.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, but please check my last comment before merging.

@Leptopoda
Copy link
Member Author

The way we collected the coverage before was broken and I think that you mainly wanted to unify both test cases.
#1858

what do you think?

@provokateurin
Copy link
Member

Please break the tests on purpose to ensure the job will fail, since that was one of the problems we had before

this allows us to easily run tests in the browser

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
@Leptopoda Leptopoda force-pushed the feat/neon_http_client/csrf_interceptor branch from 447c515 to 10e53ff Compare July 25, 2024 09:13
@provokateurin
Copy link
Member

Thanks for the test, seems like the CI will still fail properly 👍

@Leptopoda Leptopoda force-pushed the feat/neon_http_client/csrf_interceptor branch from 10e53ff to 27c5f57 Compare July 25, 2024 19:30
@Leptopoda Leptopoda merged commit eff77ff into main Jul 25, 2024
10 checks passed
@Leptopoda Leptopoda deleted the feat/neon_http_client/csrf_interceptor branch July 25, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants