-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e): ✅ new test for page RESUME
- new test - fix url error in page resume
- Loading branch information
1 parent
a8783d1
commit c0cae26
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { getDataTestId } from '@/__tests__/playwright/utils/helpers/getDataTestId' | ||
import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds' | ||
import { PAGES_URL } from '@/utils/constants/urls/pageUrls' | ||
import { expect, test } from '@playwright/test' | ||
|
||
test.describe('Links', () => { | ||
test('should navigate correctly', async ({ page }) => { | ||
await test.step('Go to Resume page', async () => { | ||
await page.goto(PAGES_URL.resume) | ||
}) | ||
|
||
const breadcrumbs = page.locator(getDataTestId(DATA_TEST_IDS.breadcrumbs)) | ||
|
||
await test.step('Check the Home link', async () => { | ||
const homeLink = breadcrumbs.locator('a[href="/"]') | ||
expect(await homeLink.count()).toBe(1) | ||
expect(await homeLink.getAttribute('href')).toBe('/') | ||
}) | ||
|
||
await test.step('Check the Resume link', async () => { | ||
const aboutLink = breadcrumbs.locator(`a[href="${PAGES_URL.resume}"]`) | ||
expect(await aboutLink.count()).toBe(1) | ||
expect(await aboutLink.getAttribute('href')).toBe(PAGES_URL.resume) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters