Skip to content

Commit ff3ba36

Browse files
Merge branch 'master' into server-anchor
2 parents 46fc700 + 6e3d9db commit ff3ba36

File tree

7 files changed

+1148
-1195
lines changed

7 files changed

+1148
-1195
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"library/postcss.config.js",
5757
"library/webpack.config.js",
5858
"library/tailwind.config.js",
59+
"library/cypress.config.js",
5960
"playground/out",
6061
"playground/postcss.config.js",
6162
"web-component/lib",

library/cypress.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
const { defineConfig } = require('cypress');
2+
const wp = require('@cypress/webpack-preprocessor');
3+
4+
module.exports = defineConfig({
5+
e2e: {
6+
specPattern: 'e2e/integration/**/*.cy.{js,jsx,ts,tsx}',
7+
supportFile: false,
8+
fixturesFolder: false,
9+
defaultCommandTimeout: 50000,
10+
11+
setupNodeEvents(on, config) {
12+
const webpackOptions = {
13+
resolve: {
14+
extensions: ['.ts', '.js'],
15+
},
16+
performance: false,
17+
module: {
18+
rules: [
19+
{
20+
test: /\.ts$/,
21+
exclude: [/node_modules/],
22+
use: [
23+
{
24+
loader: 'ts-loader',
25+
options: {
26+
configFile: 'e2e/tsconfig.json',
27+
},
28+
},
29+
],
30+
},
31+
],
32+
},
33+
};
34+
35+
on('file:preprocessor', wp({ webpackOptions }));
36+
37+
return config;
38+
},
39+
video: false,
40+
viewportWidth: 1440,
41+
viewportHeight: 720,
42+
excludeSpecPattern: '*.js.map',
43+
},
44+
});

library/cypress.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ describe('Standalone bundle', () => {
66

77
function testSuite(testName: string, site: string) {
88
describe(testName, () => {
9-
before(() => {
10-
cy.visit(site);
9+
beforeEach(() => {
10+
cy.visit(`/${site}`);
1111
});
1212

1313
it('Container should exist', () => {

library/e2e/sites/standalone-without-parser.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
},
4242
},
4343
},
44+
'x-parser-spec-parsed': true,
4445
};
4546
AsyncApiStandalone.render({ schema }, document.getElementById('spec'));
4647
</script>

library/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@
8484
"react-dom": ">=18.0.0"
8585
},
8686
"devDependencies": {
87-
"@cypress/webpack-preprocessor": "^5.9.0",
87+
"@cypress/webpack-preprocessor": "^7.0.2",
8888
"@tailwindcss/typography": "^0.4.0",
8989
"@testing-library/jest-dom": "^5.17.0",
9090
"@testing-library/react": "^15.0.4",
9191
"@testing-library/user-event": "^12.8.3",
9292
"@types/dompurify": "^3.0.5",
9393
"@types/jest": "^26.0.23",
9494
"@types/marked": "^4.0.1",
95-
"@types/node": "^12.7.2",
95+
"@types/node": "^18.0.0",
9696
"@types/react": "^18.2.79",
9797
"@types/react-dom": "^18.2.25",
9898
"autoprefixer": "^10.2.5",
9999
"cross-env": "^7.0.3",
100100
"cssnano": "^4.1.11",
101-
"cypress": "^7.4.0",
101+
"cypress": "^13.17.0",
102102
"jest": "^26.0.0",
103103
"node-polyfill-webpack-plugin": "^2.0.1",
104104
"postcss": "^8.2.10",

0 commit comments

Comments
 (0)