Repository navigation
Bring the API contract test and cookie-only web view to main - #116
Merged
Merged
Conversation
When the HttpOnly session cookie was installed, the page script now hands the dashboard only the member name; the token is still handed over when the cookie could not be installed, as for older servers without /auth/session.
…sions AnkiquestCapabilities reads GET /api/capabilities per server, keeps the answer in memory and preferences with its fetch time, and asks again after six hours, for another account, and from the poll worker. A server without the endpoint or with an unreadable answer has no features; an unreachable one keeps the last known set. The dashboard keeps receiving the token until the server reports cookie_session, so this works against servers that still need it.
The server's docs/api/examples are committed as test resources and fed to the code the app reads each answer with. The ankiquest API contract workflow replaces them with the server's current examples, runs the test daily as well as on pull requests, and checks the app's art with the server's exporter.
Check the app against the server's recorded API answers
Keep the token out of the dashboard page once its cookie is installed
…ntract-test # Conflicts: # AnkiDroid/src/main/java/com/ichi2/anki/ankiquest/AnkiquestWebSession.kt # AnkiDroid/src/test/java/com/ichi2/anki/ankiquest/AnkiquestSettingsTest.kt
|
Snapshot diff report: Previous regressions were resolved by the latest commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#91 (cookie-only web view) and #92 (the API contract test) were merged into
ankiquest-networkingafter that branch had already gone intomainthrough #90, so neither reachedmain. This merges that branch intomain.Two conflicts, both additive:
AnkiquestWebSession.kt:mainaddedlink(),usableBase(),sameSite()andrelativePath()(Open each notification where it belongs and keep AnkiQuest pages in the app #93), and Keep the token out of the dashboard page once its cookie is installed #91 gavescript()itscookieparameter. Both kept.AnkiquestSettingsTest.kt: both sides added tests at the same place. All kept.Tests: ktlint passes; all
com.ichi2.anki.ankiquesttests pass (352) apart fromAnkiquestDecksTest's learning-later test, which fails before 4am onmaintoo and is fixed separately.