Skip to content

Commit 0ca30dd

Browse files
feat: Add CI-specific Playwright configuration for base URL and web server command.
1 parent 7aa61ab commit 0ca30dd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

playwright.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
reporter: 'html',
1010
timeout: 30000,
1111
use: {
12-
baseURL: 'http://localhost:5173',
12+
baseURL: process.env.CI ? 'http://localhost:5173/BitcoinTracker/' : 'http://localhost:5173',
1313
trace: 'on-first-retry',
1414
screenshot: 'only-on-failure',
1515
video: 'retain-on-failure',
@@ -18,7 +18,7 @@ export default defineConfig({
1818
projects: [
1919
{
2020
name: 'chromium',
21-
use: {
21+
use: {
2222
...devices['Desktop Chrome'],
2323
// Configurações específicas para container
2424
launchOptions: {
@@ -37,7 +37,7 @@ export default defineConfig({
3737
// Firefox para ambiente containerizado
3838
{
3939
name: 'firefox',
40-
use: {
40+
use: {
4141
...devices['Desktop Firefox'],
4242
launchOptions: {
4343
firefoxUserPrefs: {
@@ -49,7 +49,7 @@ export default defineConfig({
4949
},
5050
],
5151
webServer: {
52-
command: 'npm run dev',
52+
command: process.env.CI ? 'npm run preview -- --port 5173' : 'npm run dev',
5353
url: 'http://localhost:5173',
5454
reuseExistingServer: !process.env.CI,
5555
timeout: 120 * 1000,

0 commit comments

Comments
 (0)