@uuv/cypress 2.82.0 → 2.84.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 +18 -0
- package/dist/cucumber/step_definitions/cypress/_.common.d.ts +1 -0
- package/dist/cucumber/step_definitions/cypress/a11y-engine.js +10 -7
- package/dist/cucumber/step_definitions/cypress/generated/_en-generated-cucumber-steps-definition.js +8 -2
- package/dist/cucumber/step_definitions/cypress/generated/_fr-generated-cucumber-steps-definition.js +8 -2
- package/dist/cypress/commands.d.ts +0 -1
- package/dist/cypress/commands.js +0 -1
- package/dist/cypress/cypress.config.js +26 -70
- package/package.json +14 -15
- package/src/cucumber/step_definitions/cypress/generated/_en-generated-cucumber-steps-definition.ts +10 -4
- package/src/cucumber/step_definitions/cypress/generated/_fr-generated-cucumber-steps-definition.ts +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [2.84.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.83.0...runner-cypress-v2.84.0) (2026-03-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **runner-commons:** update dependency figlet to v1.11.0 ([9ef9e82](https://github.com/e2e-test-quest/uuv/commit/9ef9e821f340f50a5471ebe9b986c823956a5d1e))
|
|
7
|
+
* **runner-cypress:** update dependency cypress to v15.12.0 ([05efa53](https://github.com/e2e-test-quest/uuv/commit/05efa5391684165efa222b1f773df080e7b22be7))
|
|
8
|
+
* **runner-playwright:** update dependency @cucumber/cucumber to v12.7.0 ([ee4ef96](https://github.com/e2e-test-quest/uuv/commit/ee4ef9627e620587a64f8db76dbbea0acc0f82e6))
|
|
9
|
+
* **runner-playwright:** update dependency playwright-bdd to v8.5.0 ([7003f59](https://github.com/e2e-test-quest/uuv/commit/7003f5933a4478cfcf0c880cc9182432bd388490))
|
|
10
|
+
|
|
11
|
+
# [2.83.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.82.0...runner-cypress-v2.83.0) (2026-03-15)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **a11y:** add context parameter for wcag checker ([8d5fd08](https://github.com/e2e-test-quest/uuv/commit/8d5fd08b218d3641f404a00d518912a63ee17e28))
|
|
17
|
+
* **runner-cypress:** replace webpack by esbuild ([1a690ec](https://github.com/e2e-test-quest/uuv/commit/1a690ec7db65b62200405370c7b072620aaa9dfd))
|
|
18
|
+
|
|
1
19
|
# [2.82.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.81.0...runner-cypress-v2.82.0) (2026-03-08)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -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
|
-
|
|
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,
|
|
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;
|
package/dist/cucumber/step_definitions/cypress/generated/_en-generated-cucumber-steps-definition.js
CHANGED
|
@@ -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.
|
|
570
|
+
cy.injectUvvA11y();
|
|
569
571
|
cy.fixture(context).then(context => {
|
|
570
572
|
cy.fixture(option).then(option => {
|
|
571
|
-
cy.
|
|
573
|
+
cy.checkUvvA11y({
|
|
574
|
+
reference: a11y_1.A11yReferenceEnum.WCAG_WEB,
|
|
575
|
+
runnerContext: context,
|
|
576
|
+
runnerOptions: option
|
|
577
|
+
});
|
|
572
578
|
});
|
|
573
579
|
});
|
|
574
580
|
});
|
package/dist/cucumber/step_definitions/cypress/generated/_fr-generated-cucumber-steps-definition.js
CHANGED
|
@@ -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.
|
|
570
|
+
cy.injectUvvA11y();
|
|
569
571
|
cy.fixture(context).then(context => {
|
|
570
572
|
cy.fixture(option).then(option => {
|
|
571
|
-
cy.
|
|
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";
|
package/dist/cypress/commands.js
CHANGED
|
@@ -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",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
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.
|
|
3
|
+
"version": "2.84.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
|
|
48
|
+
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.8",
|
|
49
49
|
"@testing-library/cypress": "10.1.0",
|
|
50
|
-
"@uuv/a11y": "1.0.0-beta.
|
|
51
|
-
"@uuv/runner-commons": "2.
|
|
50
|
+
"@uuv/a11y": "1.0.0-beta.99",
|
|
51
|
+
"@uuv/runner-commons": "2.78.0",
|
|
52
52
|
"axe-core": "4.11.1",
|
|
53
53
|
"chai-subset": "^1.6.0",
|
|
54
|
-
"cypress": "15.
|
|
55
|
-
"cypress-axe": "1.7.0",
|
|
54
|
+
"cypress": "15.12.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",
|
|
@@ -81,29 +80,29 @@
|
|
|
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": {
|
|
105
104
|
"@types/minimist": "1.2.5",
|
|
106
|
-
"@types/node": "22.
|
|
105
|
+
"@types/node": "22.19.15",
|
|
107
106
|
"chalk": "^4.1.2",
|
|
108
107
|
"cross-env": "7.0.3",
|
|
109
108
|
"eslint-plugin-cypress": "4.3.0",
|
package/src/cucumber/step_definitions/cypress/generated/_en-generated-cucumber-steps-definition.ts
CHANGED
|
@@ -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
|
-
|
|
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)
|
|
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.
|
|
714
|
+
cy.injectUvvA11y();
|
|
713
715
|
cy.fixture(context).then(context => {
|
|
714
716
|
cy.fixture(option).then(option => {
|
|
715
|
-
cy.
|
|
717
|
+
cy.checkUvvA11y({
|
|
718
|
+
reference: A11yReferenceEnum.WCAG_WEB,
|
|
719
|
+
runnerContext: context,
|
|
720
|
+
runnerOptions: option
|
|
721
|
+
});
|
|
716
722
|
});
|
|
717
723
|
});
|
|
718
724
|
});
|
package/src/cucumber/step_definitions/cypress/generated/_fr-generated-cucumber-steps-definition.ts
CHANGED
|
@@ -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
|
-
|
|
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)
|
|
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.
|
|
714
|
+
cy.injectUvvA11y();
|
|
713
715
|
cy.fixture(context).then(context => {
|
|
714
716
|
cy.fixture(option).then(option => {
|
|
715
|
-
cy.
|
|
717
|
+
cy.checkUvvA11y({
|
|
718
|
+
reference: A11yReferenceEnum.WCAG_WEB,
|
|
719
|
+
runnerContext: context,
|
|
720
|
+
runnerOptions: option
|
|
721
|
+
});
|
|
716
722
|
});
|
|
717
723
|
});
|
|
718
724
|
});
|