Skip to content

Commit

Permalink
chore: close pages
Browse files Browse the repository at this point in the history
  • Loading branch information
helciofranco committed Dec 11, 2024
1 parent 2cbe94e commit f796418
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/app/playwright/crx/lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ test.describe('Lock FuelWallet after inactivity', () => {
/** Account created */
await hasText(page, /Wallet created successfully/i, 0, 15000);

for (const page of pages) {
await page.close();
}
await page.close();
});

const popupPage = await test.step('Open wallet', async () => {
Expand All @@ -114,13 +112,17 @@ test.describe('Lock FuelWallet after inactivity', () => {
await getByAriaLabel(popupPage, 'Accounts').click();
await popupPage.waitForTimeout(65_000);
await hasText(popupPage, /Assets/i);
});

await test.step('Resume auto-lock timer after closing wallet', async () => {
const pages = context.pages();
for (const page of pages) {
const walletPages = pages.filter((page) => {
return page.url().includes('chrome-extension://');
});
for (const page of walletPages) {
await page.close();
}
});

await test.step('Resume auto-lock timer after closing wallet', async () => {
const page = await context.newPage();
await page.waitForTimeout(65_000);
await page.goto(`chrome-extension://${extensionId}/popup.html`);
Expand Down

0 comments on commit f796418

Please sign in to comment.