Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c99db89

Browse filesBrowse files
authored
test: replace WebdriverIO with Cypress (#19465)
* test: replace WebdriverIO with Cypress * test: use firefox for testing * dont render runner ui * switch to chrome and fix missing term var * use electron and upgrade cypress
1 parent 60a78e7 commit c99db89
Copy full SHA for c99db89

File tree

Expand file treeCollapse file tree

8 files changed

+58
-413
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+58
-413
lines changed

‎.github/renovate.json5

Copy file name to clipboardExpand all lines: .github/renovate.json5
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
"groupName": "babel",
2929
"matchPackagePrefixes": ["@babel", "babel-"]
3030
},
31-
{
32-
"description": "Group wdio packages into a single PR.",
33-
"groupName": "wdio",
34-
"matchPackagePrefixes": ["@wdio"]
35-
},
3631
{
3732
"description": "Group metascraper packages into a single PR.",
3833
"groupName": "metascraper",

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
test_on_browser:
9999
name: Browser Test
100100
runs-on: ubuntu-latest
101+
env:
102+
TERM: xterm-256color
101103
steps:
102104
- uses: actions/checkout@v4
103105
- uses: actions/setup-node@v4
@@ -106,15 +108,9 @@ jobs:
106108
- name: Install Packages
107109
run: npm install
108110
- name: Test
109-
run: node Makefile wdio
111+
run: node Makefile cypress
110112
- name: Fuzz Test
111113
run: node Makefile fuzz
112-
- uses: actions/upload-artifact@v4
113-
if: failure()
114-
with:
115-
name: logs
116-
path: |
117-
wdio-logs/*.log
118114

119115
test_types:
120116
name: Test Types of ${{ matrix.package.name }}

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
test.js
44
coverage/
55
build/
6-
logs
7-
wdio-logs
86
npm-debug.log
97
yarn-error.log
108
.pnpm-debug.log

‎Makefile.js

Copy file name to clipboardExpand all lines: Makefile.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,10 @@ target.mocha = () => {
613613
}
614614
};
615615

616-
target.wdio = () => {
616+
target.cypress = () => {
617617
echo("Running unit tests on browsers");
618618
target.webpack("production");
619-
const lastReturn = exec(`${getBinFile("wdio")} run wdio.conf.js`);
619+
const lastReturn = exec(`${getBinFile("cypress")} run --no-runner-ui`);
620620

621621
if (lastReturn.code !== 0) {
622622
exit(1);

‎cypress.config.js

Copy file name to clipboard
+50Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"use strict";
2+
3+
const { defineConfig } = require("cypress");
4+
const path = require("node:path");
5+
const webpack = require("webpack");
6+
const webpackPreprocessor = require("@cypress/webpack-preprocessor");
7+
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
8+
9+
module.exports = defineConfig({
10+
e2e: {
11+
setupNodeEvents(on) {
12+
on(
13+
"file:preprocessor",
14+
webpackPreprocessor({
15+
webpackOptions: {
16+
mode: "none",
17+
resolve: {
18+
alias: {
19+
"../../../lib/linter$": "../../../build/eslint"
20+
}
21+
},
22+
plugins: [
23+
new webpack.NormalModuleReplacementPlugin(
24+
/^node:/u,
25+
resource => {
26+
resource.request = resource.request.replace(
27+
/^node:/u,
28+
""
29+
);
30+
}
31+
),
32+
new NodePolyfillPlugin()
33+
],
34+
stats: "errors-only"
35+
}
36+
})
37+
);
38+
},
39+
specPattern: path.join(
40+
__dirname,
41+
"tests",
42+
"lib",
43+
"linter",
44+
"linter.js"
45+
),
46+
supportFile: false,
47+
reporter: "progress",
48+
screenshotOnRunFailure: false
49+
}
50+
});

‎knip.jsonc

Copy file name to clipboardExpand all lines: knip.jsonc
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
],
2525
"ignoreDependencies": [
2626
"c8",
27-
"@wdio/cli",
28-
"rollup-plugin-node-polyfills",
2927
// Optional peer dependency used for loading TypeScript configuration files
3028
"jiti"
3129
]

‎package.json

Copy file name to clipboardExpand all lines: package.json
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"release:generate:rc": "node Makefile.js generatePrerelease -- rc",
6969
"release:publish": "node Makefile.js publishRelease",
7070
"test": "node Makefile.js test",
71-
"test:browser": "node Makefile.js wdio",
71+
"test:browser": "node Makefile.js cypress",
7272
"test:cli": "mocha",
7373
"test:fuzz": "node Makefile.js fuzz",
7474
"test:performance": "node Makefile.js perf",
@@ -146,20 +146,18 @@
146146
"@arethetypeswrong/cli": "^0.17.0",
147147
"@babel/core": "^7.4.3",
148148
"@babel/preset-env": "^7.4.3",
149+
"@cypress/webpack-preprocessor": "^6.0.2",
149150
"@eslint/json": "^0.10.0",
150151
"@trunkio/launcher": "^1.3.0",
151152
"@types/node": "^20.11.5",
152153
"@typescript-eslint/parser": "^8.4.0",
153-
"@wdio/browser-runner": "^9.2.4",
154-
"@wdio/cli": "^9.2.4",
155-
"@wdio/concise-reporter": "^9.2.2",
156-
"@wdio/mocha-framework": "^9.2.2",
157154
"babel-loader": "^8.0.5",
158155
"c8": "^7.12.0",
159156
"chai": "^4.0.1",
160157
"cheerio": "^0.22.0",
161158
"common-tags": "^1.8.0",
162159
"core-js": "^3.1.3",
160+
"cypress": "^14.1.0",
163161
"ejs": "^3.0.2",
164162
"eslint": "file:.",
165163
"eslint-config-eslint": "file:packages/eslint-config-eslint",
@@ -197,12 +195,10 @@
197195
"proxyquire": "^2.0.1",
198196
"recast": "^0.23.0",
199197
"regenerator-runtime": "^0.14.0",
200-
"rollup-plugin-node-polyfills": "^0.2.1",
201198
"semver": "^7.5.3",
202199
"shelljs": "^0.8.5",
203200
"sinon": "^11.0.0",
204201
"typescript": "^5.3.3",
205-
"vite-plugin-commonjs": "^0.10.0",
206202
"webpack": "^5.23.0",
207203
"webpack-cli": "^4.5.0",
208204
"yorkie": "^2.0.0"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.