feat(neon_framework): implement custom cookie store flow
Tests are missing and the allowedBaseUri might not be 100% correct yet but an initial feedback would be appreciated.
The code is written in a way that easily allows us to move it into a separate package. I wonder if we should already do that or even require our interface in the nextcloud package and force other users to use an adapter if they want to use the cookie_jar interface.
Codecov Report
Attention: Patch coverage is 78.10219% with 30 lines in your changes are missing coverage. Please review.
Project coverage is 29.49%. Comparing base (
9d011a0) to head (1ebe527). Report is 4 commits behind head on main.
:exclamation: Current head 1ebe527 differs from pull request most recent head eb2509f. Consider uploading reports for the commit eb2509f to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #1907 +/- ##
==========================================
+ Coverage 29.40% 29.49% +0.09%
==========================================
Files 252 254 +2
Lines 84533 84690 +157
==========================================
+ Hits 24854 24982 +128
- Misses 59679 59708 +29
| Flag | Coverage Δ | *Carryforward flag | |
|---|---|---|---|
| cookie_store | 90.51% <0.00%> (-9.49%) |
:arrow_down: | |
| dynamite | 31.00% <ø> (ø) |
Carriedforward from b42811d | |
| dynamite_end_to_end_test | 61.47% <ø> (ø) |
Carriedforward from b42811d | |
| dynamite_runtime | 85.40% <ø> (ø) |
Carriedforward from b42811d | |
| neon_dashboard | 92.56% <ø> (ø) |
||
| neon_framework | 39.94% <84.92%> (+1.56%) |
:arrow_up: | |
| neon_talk | 96.48% <ø> (+0.15%) |
:arrow_up: | |
| nextcloud | 26.12% <ø> (ø) |
||
| sort_box | 90.90% <ø> (ø) |
Carriedforward from b42811d |
*This pull request uses carry forward flags. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| ...ackages/neon_framework/lib/src/models/account.dart | 92.06% <100.00%> (+0.83%) |
:arrow_up: |
| packages/neon_framework/lib/src/testing/mocks.dart | 85.71% <100.00%> (+2.38%) |
:arrow_up: |
| ...eon_framework/lib/src/storage/storage_manager.dart | 18.18% <75.00%> (+11.28%) |
:arrow_up: |
| ...kages/cookie_store/lib/src/cookie_jar_adapter.dart | 0.00% <0.00%> (ø) |
|
| ...ork/lib/src/storage/sqlite_cookie_persistence.dart | 83.33% <83.33%> (ø) |
Just a WIP for now. The SQLiteCookiePersistence does not yet pass all conformance tests.
I've adapted the code to follow our code style and only mention our cookie_store.
Sadly the upstream dev does not seem to be too interested in our changes so we'll have to maintain them here.
I kept the CookieJarAdapter in the CookieStore as our custom cookie store is now also used in the nextcloud_test package thus both it and the framework would need to define one otherwise.
If we ever decide to make publish our cookie store and make it mandatory for the nextcloud package we can remove all references to the cookie_jar package and just keep our implementation.
The CI failing is odd. It passes green on my machine with a fresh clone :thinking: