Skip to content

Commit

Permalink
change playwright testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Beltrán committed Jun 2, 2024
1 parent 9c26cb3 commit e4cd450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
npm ci
npx playwright install
npx playwright test --project webkit-dev
npx playwright test
- uses: actions/upload-artifact@v2
if: ${{ !cancelled() }}
with:
Expand Down
53 changes: 5 additions & 48 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
const { defineConfig, devices } = require('@playwright/test')

const devBaseUrl = 'http://localhost:5000'
const prodBaseUrl = 'https://ruxailab-prod.web.app'

module.exports = defineConfig({
testDir: './e2e',
Expand All @@ -19,7 +18,10 @@ module.exports = defineConfig({
workers: process.env.CI ? 1 : undefined,

/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [
['list'],
['@estruyf/github-actions-reporter']
]

/* Output directory for screenshots of failed tests */
outputDir: './playwright/output',
Expand All @@ -29,62 +31,17 @@ module.exports = defineConfig({

/* Create a screenshot if a test fails */
screenshot: { mode: 'only-on-failure', fullPage: true },

// Records video on first retry after fail
video: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium-dev',
name: 'chromium',
use: {
baseURL: devBaseUrl,
...devices['Desktop Chrome'],
},
retries: 1,
},
{
name: 'chromium-prod',
use: {
baseURL: prodBaseUrl,
...devices['Desktop Chrome'],
},
retries: 0,
},

{
name: 'firefox-dev',
use: {
baseURL: devBaseUrl,
...devices['Desktop Firefox'],
},
retries: 1,
},
{
name: 'firefox-prod',
use: {
baseURL: prodBaseUrl,
...devices['Desktop Firefox'],
},
retries: 0,
},

{
name: 'webkit-dev',
use: {
baseURL: devBaseUrl,
...devices['Desktop Safari'],
},
retries: 1,
},
{
name: prodBaseUrl,
use: {
baseURL: 'https://ruxailab-prod.web.app',
...devices['Desktop Safari'],
},
retries: 0,
},
],
})

0 comments on commit e4cd450

Please sign in to comment.