-
-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wdio with devtools protocol (#4105)
- Loading branch information
1 parent
2bfe7d1
commit b42190f
Showing
7 changed files
with
1,381 additions
and
32 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: WebDriver - Devtools Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 3.x | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
env: | ||
CI: true | ||
# Force terminal colors. @see https://www.npmjs.com/package/colors | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
- name: npm install | ||
run: | | ||
npm install --legacy-peer-deps | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true | ||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true | ||
- name: start a server | ||
run: "php -S 127.0.0.1:8000 -t test/data/app &" | ||
- name: run unit tests | ||
run: ./node_modules/.bin/mocha test/helper/WebDriver_devtools_test.js --exit | ||
- name: run tests | ||
run: "./bin/codecept.js run -c test/acceptance/codecept.WebDriver.devtools.js --grep @WebDriver --debug" | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const TestHelper = require('../support/TestHelper'); | ||
|
||
module.exports.config = { | ||
tests: './*_test.js', | ||
timeout: 10000, | ||
output: './output', | ||
helpers: { | ||
WebDriver: { | ||
url: TestHelper.siteUrl(), | ||
browser: 'Chromium', | ||
windowSize: '500x700', | ||
devtoolsProtocol: true, | ||
waitForTimeout: 5000, | ||
capabilities: { | ||
chromeOptions: { | ||
args: ['--headless', '--disable-gpu', '--window-size=500,700'], | ||
}, | ||
}, | ||
}, | ||
ScreenshotSessionHelper: { | ||
require: '../support/ScreenshotSessionHelper.js', | ||
outputPath: './output', | ||
}, | ||
Expect: {}, | ||
}, | ||
include: {}, | ||
bootstrap: async () => new Promise(done => { | ||
setTimeout(done, 5000); | ||
}), // let's wait for selenium | ||
mocha: {}, | ||
name: 'acceptance', | ||
plugins: { | ||
screenshotOnFail: { | ||
enabled: true, | ||
}, | ||
}, | ||
gherkin: { | ||
features: './gherkin/*.feature', | ||
steps: ['./gherkin/steps.js'], | ||
}, | ||
}; |
Oops, something went wrong.