Last active
December 12, 2025 08:44
-
-
Save jukbot/20520bba303451cb96336573822374c0 to your computer and use it in GitHub Desktop.
Revisions
-
jukbot revised this gist
Jun 29, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default defineConfig<ConfigOptions>({ timeout, use: { nuxt: { buildDir: '.output', rootDir: fileURLToPath(new URL('.', import.meta.url)), setupTimeout: timeout, }, -
jukbot revised this gist
Jun 28, 2024 . 1 changed file with 24 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,50 +3,62 @@ import { defineConfig, devices } from '@playwright/test' import type { ConfigOptions } from '@nuxt/test-utils/playwright' // For first setup !! // Please run 'npx playwright install' to install the browser // Increase the timeout to 2 minutes (because Nuxt server is start so slow) const timeout = 120000 const hostUrl = 'http://0.0.0.0:3001' export default defineConfig<ConfigOptions>({ testDir: './tests/e2e', outputDir: 'tests-output', snapshotDir: 'tests-screenshot', fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, reporter: process.env.CI ? 'dot' : 'html', timeout, use: { nuxt: { rootDir: fileURLToPath(new URL('.', import.meta.url)), setupTimeout: timeout, }, actionTimeout: 0, baseURL: hostUrl, trace: 'on-first-retry', screenshot: 'on', }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'], viewport: { width: 1920, height: 1080 }, // Emulates the user locale. locale: 'th-TH', // Emulates the user timezone. timezoneId: 'Asia/Bangkok', }, dependencies: ['setup db'], }, { name: 'setup db', testMatch: /global\.setup\.ts/, teardown: 'cleanup db', }, { name: 'cleanup db', testMatch: /global\.teardown\.ts/, },], /* Run your local dev server before starting the tests */ webServer: { command: 'bun run dev', port: 3001, reuseExistingServer: !process.env.CI, ignoreHTTPSErrors: true, stdout: 'ignore', stderr: 'pipe', timeout }, }) -
jukbot revised this gist
Jun 28, 2024 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type { ConfigOptions } from '@nuxt/test-utils/playwright' // Increase the timeout to 2 minutes (because Nuxt server is start so slow) const timeout = 120000 const hostUrl = 'http://0.0.0.0:3001' export default defineConfig<ConfigOptions>({ testDir: "./tests/e2e", @@ -43,7 +43,6 @@ export default defineConfig<ConfigOptions>({ webServer: { command: "bun run dev", port: 3001, reuseExistingServer: !process.env.CI, ignoreHTTPSErrors: true, stdout: 'ignore', -
jukbot revised this gist
Jun 28, 2024 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import type { ConfigOptions } from '@nuxt/test-utils/playwright' // Please run "npx playwright install" to install the browser // Increase the timeout to 2 minutes (because Nuxt server is start so slow) const timeout = 120000 const hostUrl = 'http://localhost:3001' export default defineConfig<ConfigOptions>({ testDir: "./tests/e2e", @@ -23,7 +24,7 @@ export default defineConfig<ConfigOptions>({ setupTimeout: timeout }, actionTimeout: 0, baseURL: hostUrl, trace: "on-first-retry", screenshot: 'on', }, @@ -42,11 +43,11 @@ export default defineConfig<ConfigOptions>({ webServer: { command: "bun run dev", port: 3001, url: hostUrl, reuseExistingServer: !process.env.CI, ignoreHTTPSErrors: true, stdout: 'ignore', stderr: 'pipe', timeout }, }) -
jukbot created this gist
Jun 28, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ import { fileURLToPath } from 'node:url' import { defineConfig, devices } from '@playwright/test' import type { ConfigOptions } from '@nuxt/test-utils/playwright' // For first setup !! // Please run "npx playwright install" to install the browser // Increase the timeout to 2 minutes (because Nuxt server is start so slow) const timeout = 120000 export default defineConfig<ConfigOptions>({ testDir: "./tests/e2e", outputDir: 'tests-output', snapshotDir: 'tests-output', fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, reporter: "html", timeout, use: { nuxt: { rootDir: fileURLToPath(new URL('.', import.meta.url)), setupTimeout: timeout }, actionTimeout: 0, baseURL: "http://0.0.0.0:3001", trace: "on-first-retry", screenshot: 'on', }, projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"], viewport: { width: 1920, height: 1080 }, // Emulates the user locale. locale: 'th-TH', // Emulates the user timezone. timezoneId: 'Asia/Bangkok', } }], /* Run your local dev server before starting the tests */ webServer: { command: "bun run dev", port: 3001, // url: 'http://0.0.0.0:3001', reuseExistingServer: !process.env.CI, ignoreHTTPSErrors: true, stdout: 'ignore', stderr: 'pipe', timeout }, })