Skip to content

Commit

Permalink
chore: e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron committed Jan 27, 2025
1 parent 40ac670 commit 65085a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/app/playwright/crx/crx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ test.describe('FuelWallet Extension', () => {
extensionId,
}) => {
const popupPage = await context.newPage();
await popupPage.goto(`chrome-extension://${extensionId}/popup.html`);
const page = await context.waitForEvent('page', {
const pagePromise = context.waitForEvent('page', {
predicate: (page) => page.url().includes('sign-up'),
});
await popupPage.goto(`chrome-extension://${extensionId}/popup.html`);
const page = await pagePromise;
expect(page.url()).toContain('sign-up');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ export class FuelWalletTestHelper {
}) {
const { url, chainId } = fuelProvider;
const popupNotSignedUpPage = await context.newPage();
const signupPagePromise = context.waitForEvent('page', {
predicate: (page) => page.url().includes('sign-up'),
});
await popupNotSignedUpPage.goto(
`chrome-extension://${fuelExtensionId}/popup.html`
);
const signupPage = await context.waitForEvent('page', {
predicate: (page) => page.url().includes('sign-up'),
});
const signupPage = await signupPagePromise;
expect(signupPage.url()).toContain('sign-up');
await popupNotSignedUpPage.close();

Expand Down

0 comments on commit 65085a8

Please sign in to comment.