-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
80 additions
and
1,271 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
node_modules | ||
pw-browsers | ||
test-results | ||
.env | ||
yarn.lock | ||
node_modules/ | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
{ | ||
"license": "MIT", | ||
"dependencies": { | ||
"@playwright/test": "^1.34.2", | ||
"dotenv": "^16.0.3" | ||
"name": "playwright", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": {}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@playwright/test": "^1.43.1", | ||
"@types/node": "^20.12.7" | ||
} | ||
} |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,79 @@ | ||
// @ts-check | ||
const {defineConfig, devices} = require('@playwright/test'); | ||
const { defineConfig, devices } = require('@playwright/test'); | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
require('dotenv').config(); | ||
const testRailOptions = { | ||
// Whether to add <properties> with all annotations; default is false | ||
embedAnnotationsAsProperties: true, | ||
// Where to put the report. | ||
outputFile: './test-results/junit-report.xml' | ||
}; | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* @see https://playwright.dev/docs/test-configuration | ||
*/ | ||
module.exports = defineConfig({ | ||
retries: 0, | ||
testDir: './tests', | ||
/* Run tests in files in parallel */ | ||
fullyParallel: false, | ||
//timeout: 120000, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: [ | ||
['line'], | ||
['junit', testRailOptions] | ||
], | ||
//globalSetup: './globalSetup.js', | ||
testDir: './tests', | ||
/* 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: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 1 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: 'html', | ||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
// baseURL: 'http://127.0.0.1:3000', | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: 'on-first-retry', | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: { ...devices['Desktop Chrome'] }, | ||
}, | ||
|
||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
baseURL: process.env.BASEURL, | ||
storageState: './storageState.json', | ||
extraHTTPHeaders: {'ngrok-skip-browser-warning': '123'}, | ||
//actionTimeout: 120000, | ||
ignoreHTTPSErrors: true, | ||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
trace: 'on-first-retry', | ||
video: { | ||
mode: 'on-first-retry', | ||
size: {width: 1280, height: 720}, | ||
dir: './videos' | ||
} | ||
{ | ||
name: 'firefox', | ||
use: { ...devices['Desktop Firefox'] }, | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'setup-default-settings-merchant', | ||
testMatch: './tests/Shared/setup-default-settings-merchant.spec.js', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_DEFAULT_80 | ||
} | ||
}, | ||
/*{ | ||
name: 'setup-settings-merchant', | ||
testMatch: './tests/Shared/setup-default-settings-merchant.spec.js', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_SETTINGS_80 | ||
} | ||
}, | ||
{ | ||
name: 'setup-payment-api-merchant', | ||
testMatch: './tests/Shared/setup-default-settings-merchant.spec.js', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_PAYMENT_80 | ||
} | ||
}, | ||
{ | ||
name: 'plugins-page-80', | ||
testDir: './tests/Plugins page', | ||
dependencies: ['setup-settings-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
testIdAttribute: 'data-slug', | ||
baseURL: process.env.BASEURL_SETTINGS_80 | ||
} | ||
}, | ||
{ | ||
name: 'woo-payments-tab-80', | ||
testDir: './tests/WooCommerce Payments tab', | ||
dependencies: ['setup-default-settings-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_DEFAULT_80 | ||
} | ||
},*/ | ||
{ | ||
name: 'transaction-scenarios-orders-80', | ||
testDir: './tests/transaction', | ||
dependencies: ['setup-default-settings-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_DEFAULT_80 | ||
} | ||
}, | ||
/*{ | ||
name: 'transaction-scenarios-payments-80', | ||
testDir: './tests/Transaction Scenarios', | ||
dependencies: ['setup-payment-api-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_PAYMENT_80 | ||
} | ||
}, | ||
{ | ||
name: 'mollie-settings-tab-80', | ||
testDir: './tests/Mollie Settings tab', | ||
dependencies: ['setup-settings-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_SETTINGS_80 | ||
} | ||
}, | ||
{ | ||
name: 'error-handling-80', | ||
testDir: './tests/Error Handling', | ||
dependencies: ['setup-default-settings-merchant'], | ||
use: { | ||
...devices['Desktop Chrome'], | ||
baseURL: process.env.BASEURL_DEFAULT_80 | ||
} | ||
},*/ | ||
], | ||
{ | ||
name: 'webkit', | ||
use: { ...devices['Desktop Safari'] }, | ||
}, | ||
|
||
/* Test against mobile viewports. */ | ||
// { | ||
// name: 'Mobile Chrome', | ||
// use: { ...devices['Pixel 5'] }, | ||
// }, | ||
// { | ||
// name: 'Mobile Safari', | ||
// use: { ...devices['iPhone 12'] }, | ||
// }, | ||
|
||
/* Test against branded browsers. */ | ||
// { | ||
// name: 'Microsoft Edge', | ||
// use: { ...devices['Desktop Edge'], channel: 'msedge' }, | ||
// }, | ||
// { | ||
// name: 'Google Chrome', | ||
// use: { ...devices['Desktop Chrome'], channel: 'chrome' }, | ||
// }, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
// webServer: { | ||
// command: 'npm run start', | ||
// url: 'http://127.0.0.1:3000', | ||
// reuseExistingServer: !process.env.CI, | ||
// }, | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.