@uuv/cypress 2.81.0 → 2.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [2.83.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.82.0...runner-cypress-v2.83.0) (2026-03-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * **a11y:** add context parameter for wcag checker ([8d5fd08](https://github.com/e2e-test-quest/uuv/commit/8d5fd08b218d3641f404a00d518912a63ee17e28))
7
+ * **runner-cypress:** replace webpack by esbuild ([1a690ec](https://github.com/e2e-test-quest/uuv/commit/1a690ec7db65b62200405370c7b072620aaa9dfd))
8
+
9
+ # [2.82.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.81.0...runner-cypress-v2.82.0) (2026-03-08)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **runner-playwright:** update dependency chokidar to v4.0.3 ([ff51aab](https://github.com/e2e-test-quest/uuv/commit/ff51aabadce6d0dc5e1b054472a43d1a14142ec3))
15
+ * **runner-playwright:** update dependency chokidar to v4.0.3 ([330ce8f](https://github.com/e2e-test-quest/uuv/commit/330ce8f99c8c84699cc5251159e980cb4318a277))
16
+ * **runner-playwright:** update dependency webpack to v5.105.4 ([ba8a2cf](https://github.com/e2e-test-quest/uuv/commit/ba8a2cfe2114e7e36301125b0d76a2ab1d63002d))
17
+
18
+
19
+ ### Features
20
+
21
+ * **assistant-ai:** initialize @uuv/assistant-ai, [#1222](https://github.com/e2e-test-quest/uuv/issues/1222) ([60a0090](https://github.com/e2e-test-quest/uuv/commit/60a0090ad865f5e667614b84582c1808b49137ea))
22
+
1
23
  # [2.81.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.80.0...runner-cypress-v2.81.0) (2026-03-02)
2
24
 
3
25
 
@@ -31,6 +31,7 @@ export declare function uuvFoundedElement(subject: any): Cypress.Chainable<JQuer
31
31
  export declare function pressKey(key: string): void;
32
32
  export type UuvA11yOptions = {
33
33
  reference: A11yReferenceEnum;
34
+ runnerContext?: any;
34
35
  runnerOptions?: any;
35
36
  expectedResult?: UuvA11yExpectedResult;
36
37
  };
@@ -21,12 +21,7 @@ const jquery_1 = __importDefault(require("jquery"));
21
21
  const __common_1 = require("./_.common");
22
22
  const lodash_1 = __importDefault(require("lodash"));
23
23
  const injectUvvA11y = () => {
24
- const fileName = typeof require?.resolve === "function"
25
- ? require.resolve("@uuv/a11y/bundle")
26
- : "node_modules/@uuv/a11y/bundle/uuv-a11y.bundle.js";
27
- cy.readFile(fileName).then((source) => cy.window({ log: false }).then((window) => {
28
- window.eval(source);
29
- }));
24
+ injectScript("a11yBundlePath");
30
25
  };
31
26
  exports.injectUvvA11y = injectUvvA11y;
32
27
  const checkUvvA11y = (options) => {
@@ -71,12 +66,20 @@ const showUvvA11yReport = (reference) => {
71
66
  log.finish();
72
67
  };
73
68
  exports.showUvvA11yReport = showUvvA11yReport;
69
+ function injectScript(targetScriptEnvVariable) {
70
+ cy.env([targetScriptEnvVariable]).then(({ a11yBundlePath }) => cy.readFile(a11yBundlePath).then((source) => cy.window({ log: false }).then((window) => {
71
+ window.eval(source);
72
+ })));
73
+ }
74
74
  function getA11yCheckerForReference(win, options, url) {
75
75
  let checker;
76
76
  console.debug("reference", options.reference);
77
77
  switch (options.reference) {
78
78
  case a11y_1.A11yReferenceEnum.WCAG_WEB:
79
- checker = new win.uuvA11y.WcagChecker(url, options.runnerOptions);
79
+ checker = new win.uuvA11y.WcagChecker(url, {
80
+ context: options.runnerContext,
81
+ options: options.runnerOptions,
82
+ });
80
83
  break;
81
84
  case a11y_1.A11yReferenceEnum.WCAG_ANDROID:
82
85
  break;
@@ -71,6 +71,8 @@ const dom_accessibility_api_1 = require("dom-accessibility-api");
71
71
  cy.uuvCheckContextWithinFocusedElement().then(context => {
72
72
  context.withinFocusedElement.then(focusedElement => {
73
73
  // Confirm the element is a grid or treegrid
74
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-unused-expressions
75
+ expect(focusedElement.get(0), "Focus element doesn't have grid/treegrid role").not.to.be.null;
74
76
  expect((0, dom_accessibility_api_1.getRole)(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
75
77
  cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
76
78
  .uuvFoundedElement()
@@ -565,10 +567,14 @@ const dom_accessibility_api_1 = require("dom-accessibility-api");
565
567
  * Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with an option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter) on the specific [context](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#context-parameter)
566
568
  * */
567
569
  (0, cypress_cucumber_preprocessor_1.Then)(`I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}`, function (context, option) {
568
- cy.injectAxe();
570
+ cy.injectUvvA11y();
569
571
  cy.fixture(context).then(context => {
570
572
  cy.fixture(option).then(option => {
571
- cy.checkA11y(context, option);
573
+ cy.checkUvvA11y({
574
+ reference: a11y_1.A11yReferenceEnum.WCAG_WEB,
575
+ runnerContext: context,
576
+ runnerOptions: option
577
+ });
572
578
  });
573
579
  });
574
580
  });
@@ -71,6 +71,8 @@ const dom_accessibility_api_1 = require("dom-accessibility-api");
71
71
  cy.uuvCheckContextWithinFocusedElement().then(context => {
72
72
  context.withinFocusedElement.then(focusedElement => {
73
73
  // Confirm the element is a grid or treegrid
74
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-unused-expressions
75
+ expect(focusedElement.get(0), "Focus element doesn't have grid/treegrid role").not.to.be.null;
74
76
  expect((0, dom_accessibility_api_1.getRole)(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
75
77
  cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
76
78
  .uuvFoundedElement()
@@ -565,10 +567,14 @@ const dom_accessibility_api_1 = require("dom-accessibility-api");
565
567
  * Vérifie sur la page courante qu'il n'y a aucune erreur d'accessibilité [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [avec l'option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter) sur le [contexte donné](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#context-parameter)
566
568
  * */
567
569
  (0, cypress_cucumber_preprocessor_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core sur le fichier json suivant de contexte {} et avec le fichier json suivant d'option {}`, function (context, option) {
568
- cy.injectAxe();
570
+ cy.injectUvvA11y();
569
571
  cy.fixture(context).then(context => {
570
572
  cy.fixture(option).then(option => {
571
- cy.checkA11y(context, option);
573
+ cy.checkUvvA11y({
574
+ reference: a11y_1.A11yReferenceEnum.WCAG_WEB,
575
+ runnerContext: context,
576
+ runnerOptions: option
577
+ });
572
578
  });
573
579
  });
574
580
  });
@@ -11,7 +11,6 @@
11
11
  * understanding English or French.
12
12
  */
13
13
  import "@testing-library/cypress/add-commands";
14
- import "cypress-axe";
15
14
  import { ByRoleOptions } from "@testing-library/cypress";
16
15
  import { UuvA11yOptions } from "../cucumber/step_definitions/cypress/_.common";
17
16
  import { Context } from "../cucumber/step_definitions/cypress/_context";
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  require("@testing-library/cypress/add-commands");
17
- require("cypress-axe");
18
17
  const __common_1 = require("../cucumber/step_definitions/cypress/_.common");
19
18
  require("cypress-real-events");
20
19
  const a11y_engine_1 = require("../cucumber/step_definitions/cypress/a11y-engine");
@@ -1,44 +1,12 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
38
5
  Object.defineProperty(exports, "__esModule", { value: true });
39
6
  exports.setupNodeEvents = setupNodeEvents;
40
- const webpack = __importStar(require("@cypress/webpack-preprocessor"));
41
7
  const cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
8
+ const esbuild_1 = require("@badeball/cypress-cucumber-preprocessor/esbuild");
9
+ const cypress_esbuild_preprocessor_1 = __importDefault(require("@bahmutov/cypress-esbuild-preprocessor"));
42
10
  const fs_1 = __importDefault(require("fs"));
43
11
  const event_1 = require("@uuv/runner-commons/runner/event");
44
12
  const path_1 = __importDefault(require("path"));
@@ -48,42 +16,26 @@ async function setupNodeEvents(cypressOn, config) {
48
16
  const on = require("cypress-on-fix")(cypressOn);
49
17
  await (0, cypress_cucumber_preprocessor_1.addCucumberPreprocessorPlugin)(on, config);
50
18
  await event_1.UUVListenerHelper.build();
51
- on("file:preprocessor", webpack.default({
52
- webpackOptions: {
53
- resolve: {
54
- extensions: [".ts", ".js"],
55
- fallback: {
56
- child_process: false,
57
- fs: false,
58
- path: require.resolve("path-browserify")
19
+ on("file:preprocessor", (0, cypress_esbuild_preprocessor_1.default)({
20
+ plugins: [
21
+ (0, esbuild_1.createEsbuildPlugin)(config),
22
+ {
23
+ name: "ignore-fs",
24
+ setup(build) {
25
+ build.onResolve({ filter: /^(fs|child_process)$/ }, () => ({
26
+ path: "fs",
27
+ namespace: "ignore",
28
+ }));
29
+ build.onLoad({ filter: /.*/, namespace: "ignore" }, () => ({
30
+ contents: "module.exports = {}",
31
+ loader: "js",
32
+ }));
59
33
  }
60
- },
61
- module: {
62
- rules: [
63
- {
64
- test: /\.ts$/,
65
- exclude: [/node_modules/],
66
- use: [
67
- {
68
- loader: "ts-loader",
69
- options: {
70
- transpileOnly: true,
71
- }
72
- },
73
- ],
74
- },
75
- {
76
- test: /\.feature$/,
77
- use: [
78
- {
79
- loader: "@badeball/cypress-cucumber-preprocessor/webpack",
80
- options: config,
81
- },
82
- ],
83
- },
84
- ],
85
- },
86
- },
34
+ }
35
+ ],
36
+ alias: {
37
+ path: "path-browserify"
38
+ }
87
39
  }));
88
40
  on("before:run", async () => {
89
41
  // eslint-disable-next-line dot-notation
@@ -147,7 +99,7 @@ async function setupNodeEvents(cypressOn, config) {
147
99
  }
148
100
  async function initA11yReport(reportFilePath) {
149
101
  // eslint-disable-next-line dot-notation
150
- const packageJson = await Promise.resolve(`${path_1.default.join(config.env["uuvOptions"].projectDir, "package.json")}`).then(s => __importStar(require(s)));
102
+ const packageJson = await import(path_1.default.join(config.env["uuvOptions"].projectDir, "package.json"));
151
103
  const emptyReport = {
152
104
  app: {
153
105
  name: packageJson.name,
@@ -157,6 +109,10 @@ async function setupNodeEvents(cypressOn, config) {
157
109
  };
158
110
  fs_1.default.writeFileSync(reportFilePath, JSON.stringify(emptyReport, null, 4), { flag: "w" });
159
111
  }
112
+ // eslint-disable-next-line dot-notation
113
+ config.env["a11yBundlePath"] = typeof require?.resolve === "function"
114
+ ? require.resolve("@uuv/a11y/bundle")
115
+ : "node_modules/@uuv/a11y/bundle/uuv-a11y.bundle.js";
160
116
  // Make sure to return the config object as it might have been modified by the plugin.
161
117
  return config;
162
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/cypress",
3
- "version": "2.81.0",
3
+ "version": "2.83.0",
4
4
  "type": "commonjs",
5
5
  "author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
6
6
  "description": "A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and cypress",
@@ -45,14 +45,13 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@badeball/cypress-cucumber-preprocessor": "24.0.1",
48
- "@cypress/webpack-preprocessor": "7.0.2",
48
+ "@bahmutov/cypress-esbuild-preprocessor": "^2.2.8",
49
49
  "@testing-library/cypress": "10.1.0",
50
- "@uuv/a11y": "1.0.0-beta.96",
51
- "@uuv/runner-commons": "2.75.0",
50
+ "@uuv/a11y": "1.0.0-beta.98",
51
+ "@uuv/runner-commons": "2.77.0",
52
52
  "axe-core": "4.11.1",
53
53
  "chai-subset": "^1.6.0",
54
54
  "cypress": "15.10.0",
55
- "cypress-axe": "1.7.0",
56
55
  "cypress-on-fix": "^1.1.0",
57
56
  "cypress-real-events": "^1.10.0",
58
57
  "dom-accessibility-api": "^0.7.0",
@@ -63,7 +62,7 @@
63
62
  "path-browserify": "^1.0.1",
64
63
  "ts-node": "10.9.2",
65
64
  "typescript": "5.9.3",
66
- "webpack": "5.105.3"
65
+ "webpack": "5.105.4"
67
66
  },
68
67
  "types": "./dist/index.d.ts",
69
68
  "main": "./dist/index.js",
@@ -81,24 +80,24 @@
81
80
  ],
82
81
  "exports": {
83
82
  ".": {
83
+ "types": "./dist/index.d.ts",
84
84
  "import": "./dist/index.js",
85
- "require": "./dist/index.js",
86
- "types": "./dist/index.d.ts"
85
+ "require": "./dist/index.js"
87
86
  },
88
87
  "./cypress/commands": {
88
+ "types": "./dist/cypress/commands.d.ts",
89
89
  "import": "./dist/cypress/commands.js",
90
- "require": "./dist/cypress/commands.js",
91
- "types": "./dist/cypress/commands.d.ts"
90
+ "require": "./dist/cypress/commands.js"
92
91
  },
93
92
  "./cypress/cypress.config": {
93
+ "types": "./dist/cypress/cypress.config.d.ts",
94
94
  "import": "./dist/cypress/cypress.config.js",
95
- "require": "./dist/cypress/cypress.config.js",
96
- "types": "./dist/cypress/cypress.config.d.ts"
95
+ "require": "./dist/cypress/cypress.config.js"
97
96
  },
98
97
  "./cucumber/step_definitions": {
98
+ "types": "./dist/cucumber/step_definitions/**/*.d.ts",
99
99
  "import": "./dist/cucumber/step_definitions/**/*.js",
100
- "require": "./dist/cucumber/step_definitions/**/*.js",
101
- "types": "./dist/cucumber/step_definitions/**/*.d.ts"
100
+ "require": "./dist/cucumber/step_definitions/**/*.js"
102
101
  }
103
102
  },
104
103
  "devDependencies": {
@@ -87,14 +87,16 @@ When(`I type the sentence {string} in aggrid cell at the row {int} and column na
87
87
  cy.uuvCheckContextWithinFocusedElement().then(context => {
88
88
  context.withinFocusedElement!.then(focusedElement => {
89
89
  // Confirm the element is a grid or treegrid
90
- expect(getRole(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
90
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-unused-expressions
91
+ expect(focusedElement.get(0), "Focus element doesn't have grid/treegrid role").not.to.be.null;
92
+ expect(getRole(focusedElement.get(0)!), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
91
93
 
92
94
  cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
93
95
  .uuvFoundedElement()
94
96
  .then(colmunHeaderElement => {
95
97
 
96
98
  // Retrieve column index
97
- const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
99
+ const columnIndex = Number(colmunHeaderElement.get(0)!.getAttribute("aria-colindex")) - 1;
98
100
  cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
99
101
  cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
100
102
  // Double click on the cell
@@ -709,10 +711,14 @@ Then(
709
711
  Then(
710
712
  `I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}`,
711
713
  function(context: any, option: any) {
712
- cy.injectAxe();
714
+ cy.injectUvvA11y();
713
715
  cy.fixture(context).then(context => {
714
716
  cy.fixture(option).then(option => {
715
- cy.checkA11y(context, option);
717
+ cy.checkUvvA11y({
718
+ reference: A11yReferenceEnum.WCAG_WEB,
719
+ runnerContext: context,
720
+ runnerOptions: option
721
+ });
716
722
  });
717
723
  });
718
724
  });
@@ -87,14 +87,16 @@ When(`je saisie le(s) mot(s) {string} dans la cellule aggrid à la ligne {int} e
87
87
  cy.uuvCheckContextWithinFocusedElement().then(context => {
88
88
  context.withinFocusedElement!.then(focusedElement => {
89
89
  // Confirm the element is a grid or treegrid
90
- expect(getRole(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
90
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-unused-expressions
91
+ expect(focusedElement.get(0), "Focus element doesn't have grid/treegrid role").not.to.be.null;
92
+ expect(getRole(focusedElement.get(0)!), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
91
93
 
92
94
  cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
93
95
  .uuvFoundedElement()
94
96
  .then(colmunHeaderElement => {
95
97
 
96
98
  // Retrieve column index
97
- const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
99
+ const columnIndex = Number(colmunHeaderElement.get(0)!.getAttribute("aria-colindex")) - 1;
98
100
  cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
99
101
  cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
100
102
  // Double click on the cell
@@ -709,10 +711,14 @@ Then(
709
711
  Then(
710
712
  `je ne dois pas avoir de problèmes d'accessibilité axe-core sur le fichier json suivant de contexte {} et avec le fichier json suivant d'option {}`,
711
713
  function(context: any, option: any) {
712
- cy.injectAxe();
714
+ cy.injectUvvA11y();
713
715
  cy.fixture(context).then(context => {
714
716
  cy.fixture(option).then(option => {
715
- cy.checkA11y(context, option);
717
+ cy.checkUvvA11y({
718
+ reference: A11yReferenceEnum.WCAG_WEB,
719
+ runnerContext: context,
720
+ runnerOptions: option
721
+ });
716
722
  });
717
723
  });
718
724
  });