Skip to content

Commit

Permalink
Changed playwright config
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen5959 committed Nov 15, 2024
1 parent 4818c31 commit 5a7063b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
env:
CI: true
PORT: 3001
VITE_PARSEABLE_URL: https://demo.parseable.com
VITE_BASIC_AUTH: true
VITE_USERNAME: admin
VITE_PASSWORD: admin
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
Expand Down
15 changes: 0 additions & 15 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,4 @@ export default defineConfig({
// use: { ...devices['Desktop Safari'] },
// },
],

/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm run dev',
url: 'http://localhost:3001',
reuseExistingServer: false,
timeout: 120000, // Increase timeout for server startup
env: {
PORT: '3001',
VITE_PARSEABLE_URL: 'https://demo.parseable.com',
VITE_BASIC_AUTH: 'true',
VITE_USERNAME: 'admin',
VITE_PASSWORD: 'admin',
},
},
});
13 changes: 13 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
server: {
host: true,
port: 3001,
strictPort: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
},
preview: {
port: 3001,
strictPort: true,
},
clearScreen: false,
plugins: [react()],
resolve: {
alias: {
Expand Down

0 comments on commit 5a7063b

Please sign in to comment.