Merged in feature/add-login-test-2 (pull request #3261)
e2e tests for my pages * feature/add-e2e-tests-for-mypages * remove unneccesary awaits Approved-by: Linus Flood
This commit is contained in:
22
apps/scandic-web/tests/profile/mybenefits.spec.ts
Normal file
22
apps/scandic-web/tests/profile/mybenefits.spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { expect, test } from "@playwright/test"
|
||||
|
||||
import { getProfileButton, performLogin } from "../loginUtil"
|
||||
import { testData } from "../testdata"
|
||||
|
||||
test("can navigate to my benefits page", async ({ page }) => {
|
||||
await performLogin({
|
||||
page,
|
||||
username: testData.basicUser.membershipId,
|
||||
password: testData.basicUser.password,
|
||||
})
|
||||
|
||||
const profileButton = await getProfileButton(page)
|
||||
profileButton.click()
|
||||
const myStaysLink = page.getByRole("link", { name: /my benefits/i })
|
||||
await myStaysLink.click()
|
||||
|
||||
const currentPerksAndBenefits = page.getByRole("heading", {
|
||||
name: /current perks and benefits/i,
|
||||
})
|
||||
await expect(currentPerksAndBenefits).toBeVisible()
|
||||
})
|
||||
Reference in New Issue
Block a user