Nouveautés dans l'app, et « Tout effacer » synchronisé : cet appareil ou partout (2d)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ea0ea109f
commit
8ebdca0c30
@@ -332,6 +332,18 @@ function check(scheme, cond, msg) {
|
||||
ok(await page.getByText("Premier pas").isVisible(), "succès « Premier pas »");
|
||||
await shot("14-progression", true);
|
||||
|
||||
// ---- nouveautés : une ligne discrète après une mise à jour, puis plus rien -----------
|
||||
await go("#/");
|
||||
ok(await page.locator(".news-line").isVisible(), "accueil : ligne des nouveautés pour qui utilisait déjà l'app");
|
||||
await page.locator(".news-line a").click();
|
||||
await settle();
|
||||
ok(page.url().endsWith("#/nouveautes") && await page.locator("h1").textContent() === "Nouveautés" && await page.locator(".news").count() >= 3, "page des nouveautés, par date");
|
||||
await shot("19a-nouveautes", true);
|
||||
await go("#/");
|
||||
ok(await page.locator(".news-line").count() === 0, "nouveautés vues : plus de ligne");
|
||||
await go("#/profil");
|
||||
ok(await page.getByRole("link", { name: "Nouveautés de l'app" }).isVisible(), "profil : entrée permanente vers les nouveautés");
|
||||
|
||||
// ---- bibliothèque : filtres dans l'adresse, fiche, retour (ADR 0009) -------------
|
||||
await go("#/");
|
||||
await page.getByRole("link", { name: /Bibliothèque/ }).click();
|
||||
@@ -885,6 +897,21 @@ async function syncJourney(browser, base) {
|
||||
ok(await until(() => inPage(b, async () => (await import("./main.js")).store.getState().proposals.length === 1)), "B reçoit la proposition de l'IA");
|
||||
await b.screenshot({ path: `${outDir}/${scheme}-25-b-relie.png`, fullPage: true });
|
||||
|
||||
// ---- « Tout effacer » synchronisé (2d) : deux boutons ; partout, B suit ----------
|
||||
await goto(a, "#/donnees");
|
||||
ok(await a.getByRole("button", { name: "Effacer cet appareil" }).isVisible() && await a.getByRole("button", { name: "Tout effacer partout" }).isVisible(), "synchro active : effacer cet appareil, ou partout");
|
||||
await a.getByRole("button", { name: "Tout effacer partout" }).click();
|
||||
await a.locator("dialog[open]").getByRole("button", { name: "Continuer" }).click();
|
||||
await a.locator("dialog[open]").getByRole("button", { name: "Tout effacer partout" }).click();
|
||||
ok(await until(() => a.getByRole("button", { name: "Créer mon programme" }).isVisible()), "A effacé, synchro coupée");
|
||||
ok(await inPage(a, async () => (await import("./main.js")).sync.getStatus().hasKey) === false, "A : plus de clé");
|
||||
// B rouvre l'app : la synchro de l'ouverture apprend que le journal est effacé.
|
||||
await b.reload();
|
||||
await b.waitForSelector("h1");
|
||||
ok(await until(() => inPage(b, async () => (await import("./main.js")).store.getEvents().length === 0)), "B effacé à sa synchro suivante");
|
||||
ok(await until(() => b.getByRole("button", { name: "Créer mon programme" }).isVisible()), "B revient à l'accueil vierge");
|
||||
ok(await inPage(b, async () => (await import("./main.js")).sync.getStatus().hasKey) === false, "B : plus de clé");
|
||||
|
||||
ok(errors.length === 0, "aucune erreur dans la console" + (errors.length ? " : " + errors.join(" | ") : ""));
|
||||
for (const x of [A, B, C]) await x.ctx.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user