-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e)!: move from cypress to playwright (#1991)
Signed-off-by: OMPRAKASH MISHRA <omprakashmishra3978@gmail.com>
- Loading branch information
Showing
13 changed files
with
208 additions
and
1,692 deletions.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
import { expect } from '@playwright/test'; | ||
import { baseURL } from '../utils'; | ||
import { Page } from 'playwright'; | ||
|
||
export const dashboard_page = async (page: Page) => { | ||
await page.goto(baseURL); | ||
await expect(page.getByRole('img', { name: 'Logo' })).toBeVisible(); | ||
await expect(page.locator('#root')).toContainText('QuickStart OpenShift'); | ||
await expect(page.getByText('Employee ID')).toBeVisible(); | ||
await expect(page.getByText('Employee Name')).toBeVisible(); | ||
await expect(page.getByText('Employee Email')).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Home' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'About gov.bc.ca' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Disclaimer' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Privacy' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Accessibility' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Copyright' })).toBeVisible(); | ||
await expect(page.getByRole('link', { name: 'Contact Us' })).toBeVisible(); | ||
await page.getByPlaceholder('Search…').click(); | ||
await page.getByPlaceholder('Search…').fill('john'); | ||
await expect(page.locator('#root')).toContainText('1–1 of 1'); | ||
}; |
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,9 @@ | ||
import { test } from '@playwright/test'; | ||
import { dashboard_page } from './pages/dashboard'; | ||
|
||
test.describe.parallel('QSOS', () => { | ||
test('Dashboard Page', async ({ page }) => { | ||
await dashboard_page(page); | ||
}); | ||
|
||
}); |
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 @@ | ||
export const baseURL = process.env.E2E_BASE_URL || 'https://quickstart-openshift-test-frontend.apps.silver.devops.gov.bc.ca/'; |
Oops, something went wrong.