Skip to content

Commit

Permalink
test: close pages so the auto lock run
Browse files Browse the repository at this point in the history
  • Loading branch information
helciofranco committed Dec 11, 2024
1 parent 01bc0e3 commit 2cbe94e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/pr-tests-e2e-crx-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ jobs:
- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

- name: Build Application
run: pnpm build:app
env:
## increase node.js m memory limit for building
## with sourcemaps
NODE_OPTIONS: "--max-old-space-size=4096"

- uses: ./.github/actions/setup-playwright

- name: Run E2E Tests
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/pr-tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ jobs:
- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

- name: Build Application
run: pnpm build:app
env:
## increase node.js m memory limit for building
## with sourcemaps
NODE_OPTIONS: "--max-old-space-size=4096"

- uses: ./.github/actions/setup-playwright

- name: Run E2E Tests
Expand Down
10 changes: 8 additions & 2 deletions packages/app/playwright/crx/lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ test.describe('Lock FuelWallet after inactivity', () => {

/** Account created */
await hasText(page, /Wallet created successfully/i, 0, 15000);
await page.close();

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

const popupPage = await test.step('Open wallet', async () => {
Expand All @@ -114,7 +117,10 @@ test.describe('Lock FuelWallet after inactivity', () => {
});

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

0 comments on commit 2cbe94e

Please sign in to comment.