-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(homepage): adjust homepage.page implementation
- Loading branch information
1 parent
e8f83b9
commit aa66058
Showing
3 changed files
with
41 additions
and
25 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 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,19 +1,19 @@ | ||
import { testWithII } from '@dfinity/internet-identity-playwright'; | ||
import { expect, test } from '@playwright/test'; | ||
import { Homepage, HomepageLoggedIn } from './utils/pages/homepage.page'; | ||
import { HomepageLoggedIn, HomepageLoggedOut } from './utils/pages/homepage.page'; | ||
|
||
test('should display homepage in logged out state', async ({ page }) => { | ||
const homepage = new Homepage({ page }); | ||
const homepageLoggedOut = new HomepageLoggedOut({ page }); | ||
|
||
await homepage.waitForLoggedOut(); | ||
await homepageLoggedOut.waitForReady(); | ||
|
||
await expect(page).toHaveScreenshot({ fullPage: true }); | ||
}); | ||
|
||
testWithII('should display homepage in logged in state', async ({ page, iiPage }) => { | ||
const homepageLoggedIn = new HomepageLoggedIn({ page, iiPage }); | ||
|
||
await homepageLoggedIn.waitForLoggedIn(); | ||
await homepageLoggedIn.waitForReady(); | ||
|
||
await expect(page).toHaveScreenshot({ fullPage: true }); | ||
}); |
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