This repository was archived by the owner on Sep 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +32
-0
lines changed
packages/cypress-plugin/test/integration-input-manual Expand file tree Collapse file tree 5 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import webpackConfig from "./config/webpack.js";
66import { registerSimpleGitMock } from "unflakable-test-common/dist/git.js" ;
77import { registerCosmiconfigMock } from "unflakable-test-common/dist/config.js" ;
88import { registerUnflakable } from "@unflakable/cypress-plugin" ;
9+ import semverGte from "semver/functions/gte.js" ;
10+ import path from "path" ;
911
1012/**
1113 * @type {Cypress.ConfigOptions }
@@ -43,6 +45,14 @@ export default {
4345 tasks . registerTasks ( on ) ;
4446 devtools . openDevToolsOnLaunch ( on ) ;
4547
48+ // Versions prior to 12.17.4 use Webpack 4, which doesn't support the package.json "exports"
49+ // field (see https://github.com/cypress-io/cypress/issues/23826). Webpack 5 both supports and
50+ // enforces this field, so we have to use a different require path to manually import the
51+ // skip-tests module.
52+ if ( semverGte ( config . version , "12.17.4" ) ) {
53+ config . supportFile = path . resolve ( "./cypress/support/e2e-webpack5.js" ) ;
54+ }
55+
4656 return registerUnflakable ( on , config ) ;
4757 } ,
4858 // supportFile: "cypress/support/e2e.js",
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ const { registerSimpleGitMock } = require("unflakable-test-common/dist/git");
77const {
88 registerCosmiconfigMock,
99} = require ( "unflakable-test-common/dist/config" ) ;
10+ const semverGte = require ( "semver/functions/gte" ) ;
1011
1112const { registerUnflakable } = require ( "@unflakable/cypress-plugin" ) ;
13+ const path = require ( "path" ) ;
1214
1315module . exports = {
1416 /**
@@ -46,6 +48,14 @@ module.exports = {
4648 registerTasks ( on ) ;
4749 openDevToolsOnLaunch ( on ) ;
4850
51+ // Versions prior to 12.17.4 use Webpack 4, which doesn't support the package.json "exports"
52+ // field (see https://github.com/cypress-io/cypress/issues/23826). Webpack 5 both supports and
53+ // enforces this field, so we have to use a different require path to manually import the
54+ // skip-tests module.
55+ if ( semverGte ( config . version , "12.17.4" ) ) {
56+ config . supportFile = path . resolve ( "./cypress/support/e2e-webpack5.js" ) ;
57+ }
58+
4959 return registerUnflakable ( on , config ) ;
5060 } ,
5161 // supportFile: "cypress/support/e2e.js",
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2023 Developer Innovations, LLC
2+
3+ // Import commands.js using CJS syntax:
4+ require ( "./commands.js" ) ;
5+
6+ const {
7+ registerMochaInstrumentation,
8+ } = require ( "@unflakable/cypress-plugin/skip-tests" ) ;
9+
10+ registerMochaInstrumentation ( ) ;
Original file line number Diff line number Diff line change 1616 "process" : " ^0.11.10" ,
1717 "react" : " ^18.2.0" ,
1818 "react-dom" : " ^18.2.0" ,
19+ "semver" : " ^7.5.4" ,
1920 "ts-loader" : " ^9.4.3" ,
2021 "typescript" : " ^4.9.5" ,
2122 "unflakable-test-common" : " workspace:^" ,
Original file line number Diff line number Diff line change @@ -4777,6 +4777,7 @@ __metadata:
47774777 process : ^0.11.10
47784778 react : ^18.2.0
47794779 react-dom : ^18.2.0
4780+ semver : ^7.5.4
47804781 ts-loader : ^9.4.3
47814782 typescript : ^4.9.5
47824783 unflakable-test-common : " workspace:^"
You can’t perform that action at this time.
0 commit comments