test(publish): publishing end to end against a running server
A sync test of the public tier as a whole: the author's device syncs a studyset (a topic, tagged cards, a note, an exam plan, an exam of their own), the instance builds the first release from what it holds, another person finds it in Explore and adds it to their library (the topic, the tags, the note and the plan's topic come along, the exam stays the author's), a second release is offered and taken while the learner's own edit stays, and a third is offered no more once the author withdraws. Until now each half had tests of its own only: the server's publish from rows written into its database, the app's copy and update from releases through fakes. A test can't sign in to GitHub, so it gives the author the identified scope by SQL, on the person and their sessions, as linking GitHub does. The devices' clients are exposed for what lives on the instance rather than in the synced data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
dd6c567ad0
commit
0a52a3947a
1 changed files with 289 additions and 0 deletions
|
|
@ -208,6 +208,11 @@ final class SyncDevice(
|
|||
);
|
||||
}
|
||||
|
||||
/// The device's client, signed in as its person: for what lives on the
|
||||
/// instance rather than in the synced data (profiles, publishing,
|
||||
/// Explore).
|
||||
protocol.Client get client => _client;
|
||||
|
||||
/// Sends this device's changes and receives everyone else's.
|
||||
Future<void> sync() => _client.offlineSync.syncOnce(_db);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue