Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take more screenshots #8

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test_root_password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Agama test", function () {
setInitialRootPassword(options.rootPassword);

it("should display overview card", async function () {
await page.waitForSelector("h3::-p-text('Overview')");
await page.waitForSelector("main ::-p-text('Overview')");
});

setRootPassword("test");
Expand Down
27 changes: 26 additions & 1 deletion src/test_take_screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,25 @@ describe("Agama screenshots", function () {
setInitialRootPassword(options.rootPassword);

it("should take overview page screenshot", async function () {
await page.locator("h3::-p-text('Overview')").wait();
await page.locator("main ::-p-text('Overview')").wait();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agama 11 changed <h3> to <h2>. Let's make it more generic and use the parent <main> instead.

await screenshot("overview");
});

it("should take localization page screenshot", async function () {
await page.locator("a[href='#/l10n']").click();
await page.locator("h3::-p-text('Time zone')").wait();
await screenshot("localization");
});

it("should take language selection screenshot", async function () {
await page.locator("a[href='#/l10n/locale/select']").click();
await page.type("input", "english");
// wait until the list is filtered and the non English entries are removed from the page
await page.waitForSelector("::-p-text('Afrikaans')", { hidden: true });
await screenshot("select-language");
await page.locator("button::-p-text(Cancel)").click();
});

it("should take storage page screenshot", async function () {
await page.locator("a[href='#/storage']").click();
await page.locator("h3::-p-text('Final layout')").wait();
Expand All @@ -83,4 +98,14 @@ describe("Agama screenshots", function () {
await page.locator("h3::-p-text('First user')").wait();
await screenshot("users");
});

it("should take installation confirmation popup screenshot", async function () {
// go to the overview
await page.locator("a[href='#/overview']").click();
await page.locator("main ::-p-text('Overview')").wait();
// click the install button
await page.locator("button::-p-text(Install)").click();
await page.locator("::-p-text('Confirm Installation')").wait();
await screenshot("install-button");
});
});
Loading