ci: test production frontend in browser
This commit is contained in:
@@ -239,11 +239,11 @@ test("the dedicated application workspace survives deep links, long data and uns
|
||||
const workspaceNav = page.getByRole("tablist", { name: "Workspace sections" });
|
||||
await workspaceNav.getByRole("tab", { name: "Cover Letter", exact: true }).click();
|
||||
await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}\\?section=cover-letter$`));
|
||||
await page.getByLabel("Application answer").fill("A reviewed answer that must not be lost.");
|
||||
await page.getByLabel("Application answer", { exact: true }).fill("A reviewed answer that must not be lost.");
|
||||
await workspaceNav.getByRole("tab", { name: "Analysis", exact: true }).click();
|
||||
await expect(page.getByRole("dialog", { name: "Unsaved application changes" })).toBeVisible();
|
||||
await page.getByRole("button", { name: "Keep editing" }).click();
|
||||
await expect(page.getByLabel("Application answer")).toHaveValue("A reviewed answer that must not be lost.");
|
||||
await expect(page.getByLabel("Application answer", { exact: true })).toHaveValue("A reviewed answer that must not be lost.");
|
||||
await page.getByRole("button", { name: "Save application drafts" }).click();
|
||||
await expect(page.getByText("Unsaved changes")).toHaveCount(0);
|
||||
|
||||
@@ -258,7 +258,7 @@ test("the dedicated application workspace survives deep links, long data and uns
|
||||
|
||||
await page.evaluate(() => window.localStorage.setItem("jobtracker.themeMode", "dark"));
|
||||
await page.reload();
|
||||
await expect(page.getByLabel("Application answer")).toHaveValue("A reviewed answer that must not be lost.");
|
||||
await expect(page.getByLabel("Application answer", { exact: true })).toHaveValue("A reviewed answer that must not be lost.");
|
||||
await expect(page.locator("html")).toHaveAttribute("data-color-scheme", "dark");
|
||||
|
||||
for (const width of [375, 768, 1440]) {
|
||||
|
||||
Reference in New Issue
Block a user