Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Nov 15, 2023
1 parent fadef75 commit 714b430
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/e2e-popup-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- name: Run Chrome tests
run: npm run e2e:chrome:headless:popup

- name: Run Firefox tests
run: npm run e2e:firefox:headless:popup

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
19 changes: 12 additions & 7 deletions e2e-tests/popup/test.spec.ts
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();
});

0 comments on commit 714b430

Please sign in to comment.