Skip to content

Commit

Permalink
Don't run in headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuvonen committed Dec 13, 2024
1 parent e1d9cec commit 3b94890
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions e2e/log.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ test('logs veggies', async ({page}) => {
'This Week 2 Veggies',
);

const elements = await page.getByTestId('toast-message').all();
for (const element of elements) {
await element.click();
const toasts = page.getByTestId('toast-message');
while ((await toasts.count()) > 0) {
await toasts.first().click({force: true});

Check warning on line 22 in e2e/log.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected use of { force: true } option
}

await expect(page.getByTestId('toast-message')).toBeHidden();
Expand Down
6 changes: 3 additions & 3 deletions e2e/stats.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ test("shows current week's veggies", async ({page}) => {
await page.getByText(/^apple$/).click();
await page.getByText('Apricot').click();
await page.getByText('Avocado').click();
const elements = await page.getByTestId('toast-message').all();
for (const element of elements) {
await element.click();
const toasts = page.getByTestId('toast-message');
while ((await toasts.count()) > 0) {
await toasts.first().click({force: true});

Check warning on line 12 in e2e/stats.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected use of { force: true } option
}
await page.getByTestId('navbar-link-stats').click();
await expect(page.getByTestId('tag-apple')).toBeVisible();
Expand Down
5 changes: 2 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {defineConfig, devices} from '@playwright/test';
export default defineConfig({
testDir: './e2e',
/* Maximum time one test can run for. */
timeout: 10 * 1000,
timeout: 6 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand All @@ -39,8 +39,7 @@ export default defineConfig({
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',

/* Only on CI systems run the tests headless */
headless: !!process.env.CI,
headless: false,

testIdAttribute: 'data-test-id',
},
Expand Down

0 comments on commit 3b94890

Please sign in to comment.