Skip to content

Commit

Permalink
Refactor Playwright config and manage leagues test
Browse files Browse the repository at this point in the history
This commit refactors the Playwright config by removing unnecessary code
and comments. It also updates the manage leagues test by removing the
page parameter in the beforeAll hook.
  • Loading branch information
genu committed Nov 25, 2023
1 parent 37dc79b commit 0802fcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
Expand Down Expand Up @@ -66,9 +64,9 @@ export default defineConfig({
],

/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm build && pnpm start',
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
},
// webServer: {
// command: 'pnpm dev',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
})
2 changes: 1 addition & 1 deletion tests/manage-leagues.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'
import { execSync } from 'child_process'

test.describe('Managing leagues', () => {
test.beforeAll(async ({ page }) => execSync('pnpm prisma migrate reset --force'))
test.beforeAll(async () => execSync('pnpm prisma migrate reset --force'))
test.afterAll(async () => execSync('pnpm prisma migrate reset --force'))

test('creating first league', async ({ page }) => {
Expand Down

0 comments on commit 0802fcb

Please sign in to comment.