Tests: abrir el menú «⋯» antes de pulsar Restablecer

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
urieljareth
2026-09-27 21:35:02 -06:00
co-authored by Claude Opus 5.5
parent b042329f93
commit a645056c00
+3
View File
@@ -153,6 +153,7 @@ test.describe("Restablecer, deshacer y rehacer", () => {
await anadirTipo(app, "text"); await anadirTipo(app, "text");
await campo(app, "mensajes.0.texto").fill("Mi cambio"); await campo(app, "mensajes.0.texto").fill("Mi cambio");
const mio = await estado(app); const mio = await estado(app);
await app.locator("#btn-mas").click();
await app.locator("#btn-reset").click(); await app.locator("#btn-reset").click();
const dlg = app.locator("#dlg-confirmar"); const dlg = app.locator("#dlg-confirmar");
await expect(dlg).toBeVisible(); await expect(dlg).toBeVisible();
@@ -168,6 +169,7 @@ test.describe("Restablecer, deshacer y rehacer", () => {
}); });
test("«Exportar antes» del diálogo descarga la demo actual", async ({ app }) => { test("«Exportar antes» del diálogo descarga la demo actual", async ({ app }) => {
await app.locator("#btn-mas").click();
await app.locator("#btn-reset").click(); await app.locator("#btn-reset").click();
const { nombre } = await exportar(app, () => app.locator("#dlg-confirmar").getByRole("button", { name: "Exportar antes" }).click()); const { nombre } = await exportar(app, () => app.locator("#dlg-confirmar").getByRole("button", { name: "Exportar antes" }).click());
expect(nombre).toBe("cafe-aurora.json"); expect(nombre).toBe("cafe-aurora.json");
@@ -177,6 +179,7 @@ test.describe("Restablecer, deshacer y rehacer", () => {
test("sin mensajes restablece sin preguntar", async ({ app }) => { test("sin mensajes restablece sin preguntar", async ({ app }) => {
await vaciar(app); await vaciar(app);
await app.locator("#btn-mas").click();
await app.locator("#btn-reset").click(); await app.locator("#btn-reset").click();
await expect(app.locator("#dlg-confirmar")).toHaveCount(0); await expect(app.locator("#dlg-confirmar")).toHaveCount(0);
await expect(tarjetas(app)).toHaveCount(14); await expect(tarjetas(app)).toHaveCount(14);