Skip to content

Commit ecb7502

Browse files
authored
Merge branch 'main' into qacomet/profile-tests
2 parents 7ce66ed + 7961ee7 commit ecb7502

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

e2e/fixtures/base/nav-menu.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,9 @@ export class NavMenu {
4747
})
4848
await countryLink.click()
4949
}
50+
51+
async open() {
52+
await this.navMenuButton.click()
53+
await this.navMenu.waitFor({ state: "visible" })
54+
}
5055
}

e2e/tests/public/login.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,24 @@ test.describe("Login Page functionality", async () => {
4747
await loginPage.signInButton.click()
4848
await expect(accountOverviewPage.welcomeMessage).toBeVisible()
4949
})
50+
51+
test("logging out works correctly", async ({
52+
page,
53+
accountOverviewPage,
54+
loginPage,
55+
}) => {
56+
await loginPage.accountLink.click()
57+
await loginPage.container.waitFor({ state: "visible" })
58+
await loginPage.emailInput.fill("[email protected]")
59+
await loginPage.passwordInput.fill("password")
60+
await loginPage.signInButton.click()
61+
await expect(accountOverviewPage.welcomeMessage).toBeVisible()
62+
63+
await accountOverviewPage.logoutLink.highlight()
64+
await accountOverviewPage.logoutLink.click()
65+
await loginPage.container.waitFor({ state: "visible" })
66+
67+
await loginPage.accountLink.click()
68+
await loginPage.container.waitFor({ state: "visible" })
69+
})
5070
})

0 commit comments

Comments
 (0)