✨ Liste des traites purges + suppression permanente en deux etapes (MKV puis dossier, garde-fous bibliotheque/telechargements, tag 'non complete' orange)
This commit is contained in:
1 parent
3c5029bb18
commit
545ed36600
10 files changed
+570
-9
No files matched your search
@@ -0,0 +1,58 @@
|
||||
import {expect, test} from "@playwright/test";
|
||||
import {ligneFilm, login} from "./helpers";
|
||||
|
||||
test("suppression permanente: dossier du film vidé, ligne retirée", async ({page}) => {
|
||||
await login(page);
|
||||
await page.getByRole("button", {name: "Traitements"}).click();
|
||||
await page.getByRole("button", {name: "Purgés"}).click();
|
||||
const ligne = ligneFilm(page, "Purge Simple");
|
||||
await expect(ligne).toBeVisible();
|
||||
|
||||
await ligne
|
||||
.getByRole("button", {name: "Suppression permanente"})
|
||||
.click();
|
||||
const modal = page.locator(".modal.confirm");
|
||||
await expect(modal).toBeVisible();
|
||||
await modal
|
||||
.getByRole("button", {name: "Suppression permanente"})
|
||||
.click();
|
||||
|
||||
await expect(
|
||||
page.locator(".notification").filter({hasText: /MKV et dossier du film supprimés/}),
|
||||
).toBeVisible();
|
||||
await expect(ligne).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("dossier avec d'autres fichiers: conservé puis confirmation", async ({page}) => {
|
||||
await login(page);
|
||||
await page.getByRole("button", {name: "Traitements"}).click();
|
||||
await page.getByRole("button", {name: "Purgés"}).click();
|
||||
const ligne = ligneFilm(page, "Purge Garde");
|
||||
await expect(ligne).toBeVisible();
|
||||
|
||||
// Première action: MKV supprimé, dossier conservé (autres fichiers).
|
||||
await ligne
|
||||
.getByRole("button", {name: "Suppression permanente"})
|
||||
.click();
|
||||
const modal = page.locator(".modal.confirm");
|
||||
await modal
|
||||
.getByRole("button", {name: "Suppression permanente"})
|
||||
.click();
|
||||
await expect(
|
||||
page.locator(".notification").filter({hasText: /conservé/}),
|
||||
).toBeVisible();
|
||||
|
||||
// La ligne reste, taggée « Non complété », avec le bouton de confirmation.
|
||||
await expect(ligne.getByText("Non complété")).toBeVisible();
|
||||
await ligne
|
||||
.getByRole("button", {name: "Confirmer la suppression permanente"})
|
||||
.click();
|
||||
await modal
|
||||
.getByRole("button", {name: "Confirmer la suppression permanente"})
|
||||
.click();
|
||||
|
||||
await expect(
|
||||
page.locator(".notification").filter({hasText: /Dossier du film supprimé/}),
|
||||
).toBeVisible();
|
||||
await expect(ligne).toHaveCount(0);
|
||||
});
|
||||
Reference in new issue
Block a user