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:
20
apps/scandic-web/tests/profile/mypoints.spec.ts
Normal file
20
apps/scandic-web/tests/profile/mypoints.spec.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { expect, test } from "@playwright/test"
|
||||
|
||||
import { getProfileButton, performLogin } from "../loginUtil"
|
||||
import { testData } from "../testdata"
|
||||
|
||||
test("can navigate to my points page", async ({ page }) => {
|
||||
await performLogin({
|
||||
page,
|
||||
username: testData.basicUser.membershipId,
|
||||
password: testData.basicUser.password,
|
||||
})
|
||||
|
||||
const profileButton = await getProfileButton(page)
|
||||
profileButton.click()
|
||||
const myPointsLink = page.getByRole("link", { name: /my points/i })
|
||||
await myPointsLink.click()
|
||||
|
||||
const pointsToSpend = page.getByRole("heading", { name: /points to spend/i })
|
||||
await expect(pointsToSpend).toBeVisible()
|
||||
})
|
||||
Reference in New Issue
Block a user