fix(ci): preserve portable fixtures and complete confirmation tab coverage

This commit is contained in:
cesnimda
2026-10-20 20:05:01 +02:00
parent d1fcd23087
commit 3e1057d951
4 changed files with 21 additions and 3 deletions
+3 -3
View File
@@ -69,11 +69,11 @@ def seed_operation(payload: object) -> str:
except OSError as error:
raise SeedDenied("The isolated dataRoot must already exist") from error
if (root != requested or root.parent != temporary or not root.is_dir()
or requested.is_symlink() or requested.is_junction()
or requested.is_symlink() or (sys.platform == "win32" and requested.is_junction())
or not re.fullmatch(r"jobtracker-e2e-[A-Za-z0-9][A-Za-z0-9_-]*", root.name)):
raise SeedDenied("Only an unlinked jobtracker-e2e-* direct child of system temp is allowed")
database = root / "jobtracker.db"
if (not database.is_file() or database.is_symlink() or database.is_junction()
if (not database.is_file() or database.is_symlink() or (sys.platform == "win32" and database.is_junction())
or database.resolve(strict=True) != database or database.stat().st_nlink != 1):
raise SeedDenied("The unlinked existing direct jobtracker.db file is required")
# EF's SQLite Guid converter writes uppercase canonical text.
@@ -110,7 +110,7 @@ def temporary_fixture():
yield root
finally:
assert root.parent == Path(tempfile.gettempdir()).resolve()
assert root.name.startswith("jobtracker-e2e-operation-selftest-") and not root.is_symlink() and not root.is_junction()
assert root.name.startswith("jobtracker-e2e-operation-selftest-") and not root.is_symlink() and not (sys.platform == "win32" and root.is_junction())
def self_test() -> dict:
@@ -171,8 +171,13 @@ for (const [mode, language, width] of [["light", "en", 1440], ["dark", "nb", 144
await expect(cancel).toBeFocused();
await expect(confirm).toHaveAccessibleDescription(t.attachmentsDeleteConfirm.replace("{name}", "Reviewed æøå.txt"));
await cancel.press("Shift+Tab");
const messageRegion = confirm.getByRole("region", { name: t.attachmentsDeleteTitle, exact: true });
await expect(messageRegion).toBeFocused();
await messageRegion.press("Shift+Tab");
await expect(confirm.getByRole("button", { name: t.attachmentsDelete, exact: true })).toBeFocused();
await page.keyboard.press("Tab");
await expect(messageRegion).toBeFocused();
await page.keyboard.press("Tab");
await expect(cancel).toBeFocused();
await scan(page, info, "confirm", true);
await capture(page, info, `confirm-${suffix}`);
@@ -366,7 +366,11 @@ test('[P7-05 Discovery] keyboard native create and alert updates persist; delete
const cancel = dialog.getByRole('button', { name: t.cancel, exact: true });
await expect(cancel).toBeFocused();
await page.keyboard.press('Shift+Tab');
const messageRegion = dialog.getByRole('region', { name: await dialog.getByRole('heading').innerText(), exact: true });
await expect(messageRegion).toBeFocused();
await messageRegion.press('Shift+Tab');
await expect(dialog.getByRole('button', { name: t.adminUsersDelete, exact: true })).toBeFocused();
await page.keyboard.press('Tab'); await expect(messageRegion).toBeFocused();
await page.keyboard.press('Tab'); await expect(cancel).toBeFocused();
await page.keyboard.press('Enter');
await expect(dialog).toHaveCount(0); await expect(deleteButton).toBeFocused();