✅ Tests Playwright (20 parcours utilisateur) + suite backend renforcee (56) + DOCUMENTATION.md + nettoyage (settings_store, react-router)

This commit is contained in:
Orionis312050 committed 2026-10-13 23:48:46 +00:00
1 parent 231a1f2599
commit adab24ca61
20 files changed
+1315 -88

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import {expect, test} from "@playwright/test";
import {login} from "./helpers";
test("la connexion refuse un mauvais mot de passe", async ({page}) => {
await page.goto("/");
await page.getByLabel("Nom d’utilisateur").fill("admin");
await page.getByLabel("Mot de passe").fill("faux");
await page.getByRole("button", {name: "Se connecter"}).click();
await expect(page.getByText("Identifiants incorrects")).toBeVisible();
await expect(page.getByRole("button", {name: "Se connecter"})).toBeVisible();
});
test("la connexion réussie mène au tableau de bord, la déconnexion revient au login", async ({
page,
}) => {
await login(page);
await expect(page.getByRole("button", {name: "Tableau de bord"})).toBeVisible();
// Menu utilisateur: theme + déconnexion.
await page.getByRole("button", {name: "Menu utilisateur"}).click();
await page.getByRole("menuitem", {name: "Déconnexion"}).click();
await expect(page.getByRole("button", {name: "Se connecter"})).toBeVisible();
});
test("le basculement de thème persiste", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Menu utilisateur"}).click();
await page.getByRole("menuitem", {name: "Passer en thème clair"}).click();
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
await page.reload();
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
});
+73
View File
@@ -0,0 +1,73 @@
import {expect, test} from "@playwright/test";
import {fermerNotifications, login} from "./helpers";
test("au premier lancement sans config: avertissements ciblés, scan désactivé", async ({page}) => {
await login(page);
// Avertissement Radarr (obligatoire) + info qBittorrent (optionnel).
await expect(
page.locator(".notification.warning", {hasText: /Connexion Radarr non configurée/}),
).toBeVisible();
await expect(
page.locator(".notification.info", {hasText: /qBittorrent non configuré/}),
).toBeVisible();
// Le scan est impossible sans Radarr.
await expect(page.getByRole("button", {name: "Scanner maintenant"})).toBeDisabled();
// Badges orange "non configuré".
await page.getByRole("button", {name: "Configuration"}).click();
await expect(
page.locator(".status.st-detected", {hasText: "Radarr non configuré"}),
).toBeVisible();
await expect(
page.locator(".status.st-detected", {hasText: "qBittorrent non configuré"}),
).toBeVisible();
});
test("enregistrement et test de connexion: échec explicite en badge rouge", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Configuration"}).click();
// Radarr: on configure une URL (injoignable dans l'environnement de test).
await fermerNotifications(page);
await page.getByLabel("URL Radarr").fill("http://127.0.0.1:59999");
await page.getByLabel("Clé API", {exact: true}).fill("cle-de-test");
await page.getByRole("button", {name: "Enregistrer et tester"}).first().click();
// Le test échoue: notification d'erreur, badge "Test échoué" persistant.
await expect(
page.locator(".notification.error", {hasText: /Connexion Radarr impossible/}),
).toBeVisible();
await expect(page.locator(".status.error", {hasText: "Test échoué"}).first()).toBeVisible();
// Avec Radarr configuré, le scan devient actif (et échoue proprement).
await expect(page.getByRole("button", {name: "Scanner maintenant"})).toBeEnabled();
await page.getByRole("button", {name: "Scanner maintenant"}).click();
await expect(
page.locator(".notification.error", {hasText: /Scan Radarr impossible/}),
).toBeVisible();
});
test("qBittorrent: enregistrement puis échec de test en badge rouge", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Configuration"}).click();
await fermerNotifications(page);
await page.getByLabel("URL qBittorrent").fill("http://127.0.0.1:59998");
await page.getByLabel("Utilisateur (optionnel)").fill("admin");
await page
.locator("section")
.filter({hasText: "Connexion qBittorrent"})
.getByRole("button", {name: "Enregistrer et tester"})
.click();
await expect(
page.locator(".notification.error", {hasText: /Connexion qBittorrent impossible/}),
).toBeVisible();
// Le badge repasse en rouge "Test échoué" après le rechargement du statut.
await expect(
page.locator(".status.error", {hasText: "Test échoué"}).first(),
).toBeVisible({timeout: 10_000});
});
+27
View File
@@ -0,0 +1,27 @@
import {expect, test} from "@playwright/test";
import {login} from "./helpers";
test("le tableau de bord affiche les statistiques et l'activité", async ({page}) => {
await login(page);
await expect(page.locator(".stat", {hasText: "À traiter"})).toContainText("7");
await expect(page.locator(".stat", {hasText: "En cours"})).toContainText("0");
await expect(page.locator(".stat", {hasText: "Traités"})).toContainText("1");
await expect(page.locator(".stat", {hasText: "Erreurs"})).toContainText("2");
// Colonnes d'activité: aucune conversion en cours, une terminée (Cars).
await expect(page.getByText("Aucun traitement en cours.")).toBeVisible();
await expect(
page.locator(".activity-col", {hasText: "Traitement terminé"}).getByText("Cars"),
).toBeVisible();
});
test("la navigation entre les pages fonctionne", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await expect(page.getByRole("heading", {name: "Films ISO"})).toBeVisible();
await page.getByRole("button", {name: "Configuration"}).click();
await expect(page.getByRole("heading", {name: "Connexion Radarr"})).toBeVisible();
await page.getByRole("button", {name: "Tableau de bord"}).click();
await expect(page.getByRole("heading", {name: "Activité"})).toBeVisible();
});
+116
View File
@@ -0,0 +1,116 @@
import {expect, test} from "@playwright/test";
import {ligneFilm, login} from "./helpers";
test("les onglets affichent les films dans la bonne catégorie", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
// Onglet par défaut: les films détectés sémés.
await expect(ligneFilm(page, "Pacific Rim")).toBeVisible();
await expect(ligneFilm(page, "Film Liste")).toBeVisible();
// Traités: Cars, avec sa pastille verte.
await page.getByRole("button", {name: "Traités"}).click();
await expect(ligneFilm(page, "Cars")).toBeVisible();
await expect(page.locator(".status.st-completed", {hasText: "Terminé"})).toBeVisible();
// Erreurs: Film Erreur.
await page.getByRole("button", {name: "Erreurs"}).click();
await expect(ligneFilm(page, "^Film Erreur$")).toBeVisible();
await expect(page.locator(".status.error", {hasText: "Erreur"}).first()).toBeVisible();
});
test("la fiche d'un film détecté montre l'état et l'emplacement", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await ligneFilm(page, "Film Liste").click();
const modal = page.locator(".modal");
await expect(modal.getByRole("heading", {name: "Film Liste", level: 2})).toBeVisible();
await expect(modal.getByText("Détecté")).toBeVisible();
await expect(modal.getByRole("button", {name: "Convertir en MKV"})).toBeEnabled();
// Fermeture par Échap.
await page.keyboard.press("Escape");
await expect(modal).toBeHidden();
});
test("la fiche d'un film traité affiche les deux chemins et le bouton de renommage", async ({
page,
}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Traités"}).click();
await ligneFilm(page, "Cars").click();
await expect(page.getByText("MKV lié (dossier du film)")).toBeVisible();
await expect(page.getByText("MKV brut (dossier de travail)")).toBeVisible();
await expect(page.getByRole("button", {name: "Renommer via Radarr"})).toBeVisible();
// Le MKV lié porte bien le nom du film.
await expect(page.locator("code", {hasText: "Cars (2006).mkv"}).first()).toBeVisible();
});
test("la fiche d'un film en erreur montre l'erreur et le journal", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Erreurs"}).click();
await ligneFilm(page, "^Film Erreur$").click();
const modal = page.locator(".modal");
await expect(modal.getByText(/MakeMKV a échoué/)).toBeVisible();
await expect(modal.getByText("Journal de la dernière conversion")).toBeVisible();
await expect(
modal.getByRole("button", {name: "Reprendre la conversion en MKV"}),
).toBeVisible();
});
test("l'onglet Traités propose le renommage Radarr groupé", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Traités"}).click();
const bouton = page.getByRole("button", {name: "Renommer les traités via Radarr"});
await expect(bouton).toBeVisible();
await bouton.click();
// Radarr n'est pas joignable dans l'environnement de test: échec signalé.
await expect(page.locator(".notification.error")).toContainText(/en échec/);
});
test("la suppression d'une ligne passe par une confirmation", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await ligneFilm(page, "Film Jetable 1").getByRole("button", {name: "Supprimer"}).click();
// Le modal de confirmation porte bien le nom du film visé.
await expect(
page.locator(".modal.confirm").getByRole("heading", {name: "Film Jetable 1", level: 2}),
).toBeVisible();
await page
.locator(".modal.confirm")
.getByRole("button", {name: "Supprimer", exact: true})
.click();
await expect(
page.locator(".notification", {hasText: /retiré de l'inventaire/}),
).toBeVisible();
await expect(ligneFilm(page, "Film Jetable 1")).toBeHidden();
});
test("la sélection multiple supprime plusieurs lignes", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Sélection multiple"}).click();
await ligneFilm(page, "Film Jetable 3").click();
await ligneFilm(page, "Film Jetable 4").click();
await expect(page.getByText("2 sélectionné(s)")).toBeVisible();
await page.getByRole("button", {name: "Supprimer la sélection"}).click();
await page.locator(".modal.confirm").getByRole("button", {name: "Supprimer", exact: true}).click();
await expect(
page.locator(".notification", {hasText: /ligne\(s\) retirée\(s\)/}),
).toBeVisible();
// Les deux lignes jetables ont disparu, les autres films restent.
await expect(ligneFilm(page, "Film Jetable 3")).toBeHidden();
await expect(ligneFilm(page, "Film Jetable 4")).toBeHidden();
await expect(ligneFilm(page, "Film Liste")).toBeVisible();
});
+34
View File
@@ -0,0 +1,34 @@
import {expect, test} from "@playwright/test";
import {ligneFilm, login} from "./helpers";
test("l'interface reste utilisable sur mobile", async ({page}) => {
await page.setViewportSize({width: 375, height: 812});
await login(page);
// Navigation par onglets défilants, tous accessibles.
await expect(page.getByRole("button", {name: "Traitements"})).toBeVisible();
await page.getByRole("button", {name: "Traitements"}).click();
// Les fiches restent lisibles et cliquables: pastille + actions.
const ligne = ligneFilm(page, "Pacific Rim");
await expect(ligne).toBeVisible();
await expect(ligne.locator(".status", {hasText: "Détecté"})).toBeVisible();
await ligne.click();
await expect(page.locator(".modal").getByRole("heading", {name: "Pacific Rim", level: 2})).toBeVisible();
await expect(page.getByRole("button", {name: "Convertir en MKV"})).toBeVisible();
});
test("la fiche reste lisible sur écran étroit", async ({page}) => {
await page.setViewportSize({width: 360, height: 740});
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Traités"}).click();
await ligneFilm(page, "Cars").click();
// Le tableau de la fiche passe en une colonne, contenu complet visible.
await expect(page.getByText("MKV lié (dossier du film)")).toBeVisible();
await expect(page.getByText("MKV brut (dossier de travail)")).toBeVisible();
await page.locator(".modal").getByRole("button", {name: "Fermer"}).click();
await expect(page.locator(".modal")).toBeHidden();
});
+75
View File
@@ -0,0 +1,75 @@
import {expect, test} from "@playwright/test";
import {attendreEtat, fermerNotifications, ligneFilm, login} from "./helpers";
test("conversion complète: détection → validation → traité", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
// Lancement depuis la fiche.
await ligneFilm(page, "Pacific Rim").click();
await page.getByRole("button", {name: "Convertir en MKV"}).click();
await expect(
page.locator(".notification", {hasText: /mise en file d'attente/}),
).toBeVisible();
// Le statut passe par les états actifs puis "À valider", sans recharger.
await attendreEtat(page, "Pacific Rim", "À valider");
// Fiche: les deux chemins et le bouton de validation.
await ligneFilm(page, "Pacific Rim").click();
await expect(page.getByText("MKV lié (dossier du film)")).toBeVisible();
await expect(page.getByText("MKV brut (dossier de travail)")).toBeVisible();
// Validation: Radarr est absent dans l'environnement de test, la
// validation réussit avec un avertissement.
await fermerNotifications(page);
await page.getByRole("button", {name: "Valider la conversion"}).click();
await expect(page.locator(".notification.warning").last()).toContainText(
/mise à jour Radarr impossible/,
);
// La ligne a changé de catégorie toute seule: elle est dans "Traités".
await page.getByRole("button", {name: "Traités"}).click();
await expect(ligneFilm(page, "Pacific Rim")).toBeVisible();
await expect(
ligneFilm(page, "Pacific Rim").locator(".status", {hasText: "Terminé"}),
).toBeVisible();
});
test("annulation d'une conversion à valider: retour à détecté", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await ligneFilm(page, "Autre Film").click();
await page.getByRole("button", {name: "Convertir en MKV"}).click();
await attendreEtat(page, "Autre Film", "À valider");
await ligneFilm(page, "Autre Film").click();
await fermerNotifications(page);
await page.getByRole("button", {name: "Annuler"}).click();
await expect(
page.locator(".notification", {hasText: /annulée/}),
).toBeVisible();
// Retour dans "À traiter" avec l'état détecté, MKV et lien supprimés.
await attendreEtat(page, "Autre Film", "Détecté");
await page.getByRole("button", {name: "À traiter"}).click();
await expect(ligneFilm(page, "Autre Film")).toBeVisible();
});
test("reprise d'une conversion après échec", async ({page}) => {
await login(page);
await page.getByRole("button", {name: "Traitements"}).click();
await page.getByRole("button", {name: "Erreurs"}).click();
await ligneFilm(page, "Film Erreur Bis").click();
await page.getByRole("button", {name: "Reprendre la conversion en MKV"}).click();
await expect(
page.locator(".notification", {hasText: /mise en file d'attente/}),
).toBeVisible();
// Pendant la conversion la ligne quitte "Erreurs": on la suit dans
// l'onglet "En cours" jusqu'a "À valider".
await page.getByRole("button", {name: "En cours"}).click();
await attendreEtat(page, "Film Erreur Bis", "À valider");
});
+37
View File
@@ -0,0 +1,37 @@
import type {Page} from "@playwright/test";
import {expect} from "@playwright/test";
/** Connexion au compte seme par le serveur d'integration. */
export async function login(page: Page) {
await page.goto("/");
await page.getByLabel("Nom d’utilisateur").fill("admin");
await page.getByLabel("Mot de passe").fill("mot-de-passe-123");
await page.getByRole("button", {name: "Se connecter"}).click();
await expect(page.getByRole("button", {name: "Scanner maintenant"})).toBeVisible();
}
/** Ligne d'un film dans la liste: l'article portant le titre en en-tete. */
export function ligneFilm(page: Page, titre: string) {
return page
.locator("article")
.filter({has: page.getByRole("heading", {name: new RegExp(titre)})});
}
/** Referme les notifications empilees en bas a droite.
* Elles couvrent les boutons d'action des formulaires et des fiches: on les
* degage avant d'interagir.
*/
export async function fermerNotifications(page: Page) {
const boutons = page.getByRole("button", {name: "Supprimer la notification"});
for (let i = (await boutons.count()) - 1; i >= 0; i--) {
await boutons.nth(i).click();
}
}
/** Attend que la pastille du film atteigne l'etat voulu (polling de 3 s). */
export async function attendreEtat(page: Page, titre: string, etat: string) {
await expect(ligneFilm(page, titre).locator(".status", {hasText: etat})).toBeVisible({
timeout: 20_000,
});
}
+46 -58
View File
@@ -11,12 +11,12 @@
"@vitejs/plugin-react": "latest",
"react": "latest",
"react-dom": "latest",
"react-router-dom": "latest",
"typescript": "latest",
"vite": "latest"
},
"devDependencies": {
"@eslint/js": "latest",
"@playwright/test": "^1.64.0",
"@types/react": "latest",
"@types/react-dom": "latest",
"eslint": "latest",
@@ -567,6 +567,22 @@
"url": "https://github.com/sponsors/oxc-project"
}
},
"node_modules/@playwright/test": {
"version": "1.64.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.64.0.tgz",
"integrity": "sha512-oTN9FNYuN6bqQMwiho6jJKLCG2/QOYCixGXuCjRmzOq23eODeukuY2XiAVoVpAECbuezMt1MHQjAiQxK8F+Y+g==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.64.0"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@rolldown/binding-android-arm-eabi": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.13.tgz",
@@ -1278,19 +1294,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/cookie": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
"integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -2275,6 +2278,35 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/playwright": {
"version": "1.64.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.0.tgz",
"integrity": "sha512-kVzTnYFYEyQ9RGzBjNCd2+yEqWmVbxl3AHPynv3qQ6JTjv4a+kwRcnqQwIpuP3NnrnIrE/Q6wWAIAvMfIE2/Yg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.64.0"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/playwright-core": {
"version": "1.64.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.0.tgz",
"integrity": "sha512-T9r+MZkTECl2+oUcZ26YgZzTrYidTsIhYYkJix+6iDOymOb1FB2RLLSOxRGnZGv5DStt+aduIVbt+E8WygXYpg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/postcss": {
"version": "8.5.29",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.29.tgz",
@@ -2364,44 +2396,6 @@
"react": "^19.3.0"
}
},
"node_modules/react-router": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.4.tgz",
"integrity": "sha512-PUPQcMhMGRAslLcvtlPz/kmzBEWPhLdgLFrL7pLNepBL6dX0lWj4WD2cUYVgYCuT3jxvghYFg81cDTj44DhetQ==",
"license": "MIT",
"dependencies": {
"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
}
}
},
"node_modules/react-router-dom": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.4.tgz",
"integrity": "sha512-yrfmJHIpDG7taCpqKjT1G5B6q3O2K+RN8/fgNf0lTjCwiPbQ0ei6vXX9ZjQR+7ld8Tr7Z5xmyMnZ8YJrphWQUw==",
"license": "MIT",
"dependencies": {
"react-router": "7.18.4"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
}
},
"node_modules/rolldown": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.13.tgz",
@@ -2451,12 +2445,6 @@
"semver": "bin/semver.js"
}
},
"node_modules/set-cookie-parser": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
"integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
"license": "MIT"
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+8 -7
View File
@@ -6,24 +6,25 @@
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"lint": "eslint ."
"lint": "eslint .",
"test:e2e": "playwright test"
},
"dependencies": {
"@vitejs/plugin-react": "latest",
"vite": "latest",
"typescript": "latest",
"react": "latest",
"react-dom": "latest",
"react-router-dom": "latest"
"typescript": "latest",
"vite": "latest"
},
"devDependencies": {
"@eslint/js": "latest",
"@playwright/test": "^1.64.0",
"@types/react": "latest",
"@types/react-dom": "latest",
"eslint": "latest",
"@eslint/js": "latest",
"typescript-eslint": "latest",
"eslint-plugin-react-hooks": "latest",
"eslint-plugin-react-refresh": "latest",
"globals": "latest"
"globals": "latest",
"typescript-eslint": "latest"
}
}
+41
View File
@@ -0,0 +1,41 @@
import {fileURLToPath} from "node:url";
import {defineConfig, devices} from "@playwright/test";
const webDir = fileURLToPath(new URL(".", import.meta.url));
/**
* Tests fonctionnels (Playwright) du web.
*
* Le serveur d'integration (scripts/e2e_server.py) prepare un environnement
* isole, seme un compte (admin / mot-de-passe-123) et des films dans tous
* les etats, sert le front construit (web/dist) via l'API sur le port 8123.
* Les conversions tournent en mode simulation: les parcours utilisateur sont
* reels, sans Radarr ni qBittorrent.
*/
export default defineConfig({
testDir: "./e2e",
timeout: 90_000,
fullyParallel: false,
workers: 1,
reporter: [["list"], ["html", {outputFolder: ".e2e-report", open: "never"}]],
outputDir: ".e2e-results",
use: {
baseURL: "http://127.0.0.1:8123",
actionTimeout: 15_000,
expect: {timeout: 15_000},
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: {...devices["Desktop Chrome"]},
},
],
webServer: {
command: "../.venv/bin/python ../scripts/e2e_server.py",
cwd: webDir,
url: "http://127.0.0.1:8123/api/health",
reuseExistingServer: false,
timeout: 120_000,
},
});
+7 -2
View File
@@ -345,8 +345,13 @@ export default function App() {
`/api/movies/${selected.id}/log`,
).catch(() => null);
if (cancelled) return;
if (detail) setSelected(detail);
if (log) {
// Ne re-rend la fiche que si son contenu change reellement: le
// rafraichissement continu ne doit pas re-creer les boutons en pleine
// interaction (clic, focus).
if (detail && JSON.stringify(detail) !== JSON.stringify(selected)) {
setSelected(detail);
}
if (log && (log.running !== logRunning || log.lines.length !== logLines.length)) {
setLogLines(log.lines);
setLogRunning(log.running);
}
+1 -4
View File
@@ -1,13 +1,10 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import App from "./App";
import "./style.css";
createRoot(document.getElementById("root")!).render(
<StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
<App />
</StrictMode>,
);