Keep the administration settings locked until their data reloads after a save
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d5c2900eed
commit
2858b3e359
4 changed files with 23 additions and 10 deletions
|
|
@ -1521,6 +1521,13 @@ test("administrator navigates sections, manages mythic content and previews visu
|
|||
await expect(eclatsArticle).toContainText("Fermé aux joueurs");
|
||||
const eclatPrice = eclatsArticle.getByLabel("Prix d’un Éclat d’étoile");
|
||||
await expect(eclatPrice).toHaveValue("3");
|
||||
// Machine lente simulée : les champs restent verrouillés de l'enregistrement au rechargement des données, sinon le formulaire
|
||||
// recréé à son arrivée efface une saisie commencée entre les deux.
|
||||
const slowRequests = /\/api\/cards\/admin\/(dashboard|expeditions\/settings)$/;
|
||||
await page.route(slowRequests, async (route) => {
|
||||
await new Promise((resolve) => globalThis.setTimeout(resolve, 600));
|
||||
await route.continue();
|
||||
});
|
||||
for (const price of ["4", "3"]) {
|
||||
await eclatPrice.fill(price);
|
||||
await articlesForm.getByRole("button", { name: "Appliquer" }).click();
|
||||
|
|
@ -1528,6 +1535,8 @@ test("administrator navigates sections, manages mythic content and previews visu
|
|||
await expect(eclatPrice).toHaveValue(price);
|
||||
await expect(articlesForm.getByRole("button", { name: "Appliquer" })).toBeDisabled();
|
||||
}
|
||||
await expect(eclatPrice).toBeEnabled();
|
||||
await page.unroute(slowRequests);
|
||||
await expect(eclatsArticle).toContainText("Premier niveau d’une légendaire (70 Éclats) = 210 poussières.");
|
||||
await noOverflow();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue