-
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.
- Loading branch information
1 parent
f737f83
commit d8d0e00
Showing
2 changed files
with
9 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { Page } from 'playwright'; | ||
import { expect, Page, Locator } from '@playwright/test'; | ||
|
||
export class PortalPage { | ||
private page: Page; | ||
private portalHeader: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.portalHeader = page.locator("css=[data-control='BrandLogo']"); | ||
|
||
} | ||
|
||
// Add your methods and actions for the portal page here | ||
|
||
async navigateToPortal() { | ||
// Implement the logic to navigate to the portal page | ||
async portalHeaderIsDisplayed() { | ||
await expect(this.portalHeader).toBeVisible(); | ||
} | ||
|
||
async performSomeAction() { | ||
// Implement the logic to perform some action on the portal page | ||
} | ||
|
||
// Add more methods as needed | ||
} |
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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import { test } from '@playwright/test'; | ||
import { LoginPage } from '../pages/login-page.js'; | ||
import { PortalPage } from '../pages/portal-page.js'; | ||
|
||
// @ts-check | ||
|
||
test('ScoreSense', async ({ page }) => { | ||
const loginPage = new LoginPage(page); | ||
const portalPage = new PortalPage(page); | ||
await loginPage.goto(); | ||
await loginPage.login(); | ||
await portalPage.portalHeaderIsDisplayed(); | ||
}); |