Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swapp codecpetjs to playwright e2e tests #3764

Closed
wants to merge 14 commits into from
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@
"test:smoke:local": "webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/smoke.conf.js --local",
"test:crossbrowser": "protractor ./test/e2e/config/crossbrowser.conf.js",
"test:fullfunctional": "yarn run test:xuiIntegration && yarn run test:functionalApiE2e",
"test:fullfunctional2": "yarn playwright install && npx playwright test --project MicrosoftEdge",
"test:fullfunctional2": "yarn playwright install && npx playwright test --project chromium",
"test:fullfunctional:local": "webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/fullfunctional.conf.js --local",
"test:functional1": "yarn run test:xuiIntegration && yarn run test:functionalApiE2e",
"test:functional_old": "yarn test:api && yarn run test:xuiIntegration && yarn run test:codeceptE2E",
"test:functional": "npm-run-all -p -l -n -c test:api test:xuiIntegration test:codeceptE2E",
"test:functional_old2": "npm-run-all -p -l -n -c test:api test:xuiIntegration test:codeceptE2E",
"test:functional": "yarn playwright install && npx playwright test --project chromium",
"test:functional:backup": "webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/conf.js --local",
"test:functional:local": "yarn test:ngIntegration && webdriver-manager update --versions.chrome 2.40 && protractor ./test/e2e/config/functional.conf.js --local",
"test:functionalApiE2e": "yarn run test:api && yarn run test:codeceptE2E",
Expand Down
20 changes: 11 additions & 9 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { defineConfig, devices } from "@playwright/test";

const headless = process.env.HEAD !== 'true';

module.exports = defineConfig({
testDir: "./playwright_tests/E2E",
/* Run tests in files in parallel */
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: 4, // Set the number of retries for all projects
retries: 3, // Set the number of retries for all projects

timeout: 10 * 60 * 1000, // 10 minutes
timeout: 3 * 60 * 1000, // 10 minutes
expect: {
timeout: 5 * 60 * 1000, // 5 minutes
timeout: 1 * 60 * 1000, // 5 minutes
},
reportSlowTests: null,

Expand All @@ -23,39 +25,39 @@ module.exports = defineConfig({
name: "chromium",
use: { ...devices["Desktop Chrome"],
channel: "chrome",
headless: false,
headless: headless,
trace: "on-first-retry",
},
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"],
screenshot: 'only-on-failure',
headless: false,
headless: headless,
trace: 'off'
},
},
{
name: "webkit",
use: { ...devices["Desktop Safari"],
screenshot: 'only-on-failure',
headless: false,
headless: headless,
trace: 'off'
},
},
{
name: "MobileChrome",
use: { ...devices["Pixel 5"],
screenshot: 'only-on-failure',
headless: false,
headless: headless,
trace: 'off'
},
},
{
name: "MobileSafari",
use: { ...devices["iPhone 12"],
screenshot: 'only-on-failure',
headless: false,
headless: headless,
trace: 'off'
},
},
Expand All @@ -64,7 +66,7 @@ module.exports = defineConfig({
use: { ...devices["Desktop Edge"],
channel: "msedge",
screenshot: 'only-on-failure',
headless: false,
headless: headless,
trace: 'off'
},
},
Expand Down
2 changes: 1 addition & 1 deletion yarn-audit-known-issues

Large diffs are not rendered by default.