From b6d5e4316b7d39909002f28fed52b9a68eb64a06 Mon Sep 17 00:00:00 2001 From: Lova Andriarimalala <43842786+Xpirix@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:36:09 +0300 Subject: [PATCH] Update e2e test --- .../ci-test/tests/06-resources-page.spec.ts | 7 ++++ .../tests/fixtures/installation-guide-page.ts | 1 + playwright/ci-test/tests/fixtures/sidebar.ts | 37 ++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/playwright/ci-test/tests/06-resources-page.spec.ts b/playwright/ci-test/tests/06-resources-page.spec.ts index 2ffd7f4e0..923ad17a7 100644 --- a/playwright/ci-test/tests/06-resources-page.spec.ts +++ b/playwright/ci-test/tests/06-resources-page.spec.ts @@ -82,6 +82,13 @@ test.describe("Resources pages", () => { test("Installation guide", async ({ sidebar, installationGuidePage }) => { await expect(sidebar.installationGuideLink).toBeVisible(); await sidebar.installationGuideLink.click(); + await expect(sidebar.windowsLink).toBeVisible(); + await expect(sidebar.linuxLink).toBeVisible(); + await expect(sidebar.macOSLink).toBeVisible(); + await expect(sidebar.freeBSDLink).toBeVisible(); + await expect(sidebar.openBSDLink).toBeVisible(); + await expect(sidebar.qgisTestingWarningLink).toBeVisible(); + await expect(sidebar.installingFromSourceLink).toBeVisible(); await expect( installationGuidePage.upcomingEvaluationLink, ).toBeVisible(); diff --git a/playwright/ci-test/tests/fixtures/installation-guide-page.ts b/playwright/ci-test/tests/fixtures/installation-guide-page.ts index 48988741a..15d9ddcc0 100644 --- a/playwright/ci-test/tests/fixtures/installation-guide-page.ts +++ b/playwright/ci-test/tests/fixtures/installation-guide-page.ts @@ -127,6 +127,7 @@ export class InstallationGuidePage { }); this.osgeo4WInstallerLink = this.page.getByRole("link", { name: "OSGeo4W Installer", + exact: true, }); this.aptInstallGnupgPre = this.page .locator("pre") diff --git a/playwright/ci-test/tests/fixtures/sidebar.ts b/playwright/ci-test/tests/fixtures/sidebar.ts index 12c0e1a16..4f426b2a5 100644 --- a/playwright/ci-test/tests/fixtures/sidebar.ts +++ b/playwright/ci-test/tests/fixtures/sidebar.ts @@ -26,6 +26,13 @@ export class Sidebar { public readonly supportLink: Locator; public readonly membersLink: Locator; public readonly pastMembersLink: Locator; + public readonly windowsLink: Locator; + public readonly linuxLink: Locator; + public readonly macOSLink: Locator; + public readonly freeBSDLink: Locator; + public readonly openBSDLink: Locator; + public readonly qgisTestingWarningLink: Locator; + public readonly installingFromSourceLink: Locator; constructor(public readonly page: Page) { this.sidebar = this.page.locator("#sidebar"); @@ -81,11 +88,39 @@ export class Sidebar { this.membershipLink = this.sidebar.getByRole("link", { name: "Membership", }); - this.installationGuideLink = this.sidebar.getByRole("link", { name: "Installation guide", }); + this.windowsLink = this.sidebar.getByRole("link", { + name: "Windows", + }); + + this.linuxLink = this.sidebar.getByRole("link", { + name: "Linux", + exact: true, + }); + + this.macOSLink = this.sidebar.getByRole("link", { + name: "Mac OS X / macOS", + }); + + this.freeBSDLink = this.sidebar.getByRole("link", { + name: "FreeBSD", + }); + + this.openBSDLink = this.sidebar.getByRole("link", { + name: "OpenBSD", + }); + + this.qgisTestingWarningLink = this.sidebar.getByRole("link", { + name: "QGIS Testing Warning", + }); + + this.installingFromSourceLink = this.sidebar.getByRole("link", { + name: "Installing from Source", + }); + this.archiveLink = this.sidebar.getByRole("link", { name: "Archive", exact: true,