-
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.
- Loading branch information
ost-ptk
committed
Nov 15, 2023
1 parent
fadef75
commit 714b430
Showing
2 changed files
with
12 additions
and
10 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,15 +1,20 @@ | ||
import { test } from '../fixtures'; | ||
import { DEFAULT_FIRST_ACCOUNT, vaultPassword } from '../common'; | ||
|
||
test('test', async ({ browser, context, page }) => { | ||
// const context = await browser.newContext(); | ||
// const page = await context.newPage(); | ||
test('test', async ({ extensionId, context, page }) => { | ||
await page.goto(`chrome-extension://${extensionId}/popup.html`); | ||
|
||
await page.goto('https://playwright.dev/'); | ||
await page.getByPlaceholder('Password', { exact: true }).fill(vaultPassword); | ||
await page.getByRole('button', { name: 'Unlock wallet' }).click(); | ||
|
||
const [github] = await Promise.all([ | ||
await page.getByTestId('popover-children-container').click(); | ||
|
||
const [cspr] = await Promise.all([ | ||
context.waitForEvent('page'), | ||
await page.locator("//a[@aria-label='GitHub repository']").click() | ||
await page.getByText('View on CSPR.live').click() | ||
]); | ||
|
||
await test.expect(github.locator('#user-content--playwright')).toBeVisible(); | ||
await test | ||
.expect(cspr.getByText(DEFAULT_FIRST_ACCOUNT.truncatedPublicKey)) | ||
.toBeVisible(); | ||
}); |