@uuv/cypress 2.65.2 → 2.67.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,19 @@
1
+ # [2.67.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.66.0...runner-cypress-v2.67.0) (2025-08-29)
2
+
3
+
4
+ ### Features
5
+
6
+ * add sentence to edit AG Grid cell, [#1078](https://github.com/e2e-test-quest/uuv/issues/1078) ([d343b01](https://github.com/e2e-test-quest/uuv/commit/d343b01ca599a7a02889d77bd869d2bf396f321b))
7
+ * update react monorepo to v19 ([4e10a59](https://github.com/e2e-test-quest/uuv/commit/4e10a59abf9a343b311ef4a2b3223dcf1555638f))
8
+
9
+ # [2.66.0](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.65.2...runner-cypress-v2.66.0) (2025-08-25)
10
+
11
+
12
+ ### Features
13
+
14
+ * **assistant:** update dependency antd to v5.27.1 ([d0dc967](https://github.com/e2e-test-quest/uuv/commit/d0dc967bc686e5710b35adefc8b040a404581f95))
15
+ * **runner-playwright:** migrate to playwright-bdd 8.4.0 ([0c9e0f0](https://github.com/e2e-test-quest/uuv/commit/0c9e0f095194af15cb21a822500e6db0410189d7))
16
+
1
17
  ## [2.65.2](https://github.com/e2e-test-quest/uuv/compare/runner-cypress-v2.65.1...runner-cypress-v2.65.2) (2025-08-13)
2
18
 
3
19
 
@@ -21,6 +21,7 @@ require("../../../../cypress/commands");
21
21
  const core_engine_1 = require("../core-engine");
22
22
  const a11y_1 = require("@uuv/a11y");
23
23
  const __common_1 = require("./../_.common");
24
+ const dom_accessibility_api_1 = require("dom-accessibility-api");
24
25
  /**
25
26
  * Navigate to the Uri passed as a argument (full url consisting of the BASE_URL + Uri) or navigate to Url if begin with http:// or https://
26
27
  * */
@@ -63,6 +64,31 @@ const __common_1 = require("./../_.common");
63
64
  (0, cypress_cucumber_preprocessor_1.When)(`I enter the value {string}`, function (textToType) {
64
65
  type(textToType);
65
66
  });
67
+ /**
68
+ * Writes the sentence passed as a parameter in the ag-Grid cell at the specified row and column name (useful for example to fill in a form field in ag-Grid).<br/>Make sure you've selected an ag-Grid element beforehand with the <strong>within...</strong> phrases.
69
+ * */
70
+ (0, cypress_cucumber_preprocessor_1.When)(`I type the sentence {string} in aggrid cell at the row {int} and column named {string}`, function (textToType, lineNumber, columnName) {
71
+ cy.uuvCheckContextWithinFocusedElement().then(context => {
72
+ context.withinFocusedElement.then(focusedElement => {
73
+ // Confirm the element is a grid or treegrid
74
+ expect((0, dom_accessibility_api_1.getRole)(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
75
+ cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
76
+ .uuvFoundedElement()
77
+ .then(colmunHeaderElement => {
78
+ // Retrieve column index
79
+ const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
80
+ cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
81
+ cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
82
+ // Double click on the cell
83
+ cy.wrap(cells[columnIndex]).dblclick();
84
+ // Type text in the cell
85
+ cy.findByLabelText("Input Editor").type(textToType);
86
+ });
87
+ });
88
+ });
89
+ });
90
+ });
91
+ });
66
92
  /**
67
93
  * Select the combo box option passed as a parameter (useful for example to fill in a combobox form field).<br/>Make sure you've selected a combo box element beforehand with the <strong>within a combo box named 'yourComboboxNamee'</strong> phrases.
68
94
  * */
@@ -21,6 +21,7 @@ require("../../../../cypress/commands");
21
21
  const core_engine_1 = require("../core-engine");
22
22
  const a11y_1 = require("@uuv/a11y");
23
23
  const __common_1 = require("./../_.common");
24
+ const dom_accessibility_api_1 = require("dom-accessibility-api");
24
25
  /**
25
26
  * Navigue vers l'Uri passé en paramètre (url complète étant constituée de la BASE_URL + Uri) ou navigue vers l'Url si ça commence par http:// ou https://
26
27
  * */
@@ -52,7 +53,7 @@ const __common_1 = require("./../_.common");
52
53
  (0, core_engine_1.click)(role, name);
53
54
  });
54
55
  /**
55
- * Saisit de la phrase passée en paramètre (utile par exemple pour remplir un champ de formulaire).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
56
+ * Saisie de la phrase passée en paramètre (utile par exemple pour remplir un champ de formulaire).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
56
57
  * */
57
58
  (0, cypress_cucumber_preprocessor_1.When)(`je saisie le(s) mot(s) {string}`, function (textToType) {
58
59
  type(textToType);
@@ -63,6 +64,31 @@ const __common_1 = require("./../_.common");
63
64
  (0, cypress_cucumber_preprocessor_1.When)(`j'entre la valeur {string}`, function (textToType) {
64
65
  type(textToType);
65
66
  });
67
+ /**
68
+ * Saisie de la phrase passée en paramètre dans une cellule d'une grille ag-Grid (utile par exemple pour remplir une cellule dans une grille).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
69
+ * */
70
+ (0, cypress_cucumber_preprocessor_1.When)(`je saisie le(s) mot(s) {string} dans la cellule aggrid à la ligne {int} et la colonne nommée {string}`, function (textToType, lineNumber, columnName) {
71
+ cy.uuvCheckContextWithinFocusedElement().then(context => {
72
+ context.withinFocusedElement.then(focusedElement => {
73
+ // Confirm the element is a grid or treegrid
74
+ expect((0, dom_accessibility_api_1.getRole)(focusedElement.get(0)), "Focus element doesn't have grid/treegrid role").to.be.oneOf(["grid", "treegrid"]);
75
+ cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
76
+ .uuvFoundedElement()
77
+ .then(colmunHeaderElement => {
78
+ // Retrieve column index
79
+ const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
80
+ cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
81
+ cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
82
+ // Double click on the cell
83
+ cy.wrap(cells[columnIndex]).dblclick();
84
+ // Type text in the cell
85
+ cy.findByLabelText("Input Editor").type(textToType);
86
+ });
87
+ });
88
+ });
89
+ });
90
+ });
91
+ });
66
92
  /**
67
93
  * Sélectionne l'option passée en paramètre (utile par exemple pour remplir un champ le liste déroulante).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur de la liste déroulante nommée 'maListeDeroulante'</strong>.
68
94
  * */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/cypress",
3
- "version": "2.65.2",
3
+ "version": "2.67.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",
@@ -47,8 +47,8 @@
47
47
  "@badeball/cypress-cucumber-preprocessor": "22.0.1",
48
48
  "@cypress/webpack-preprocessor": "6.0.4",
49
49
  "@testing-library/cypress": "10.0.3",
50
- "@uuv/a11y": "1.0.0-beta.77",
51
- "@uuv/runner-commons": "2.59.2",
50
+ "@uuv/a11y": "1.0.0-beta.79",
51
+ "@uuv/runner-commons": "2.61.0",
52
52
  "axe-core": "4.10.3",
53
53
  "chai-subset": "^1.6.0",
54
54
  "cypress": "14.4.0",
@@ -102,7 +102,7 @@
102
102
  },
103
103
  "devDependencies": {
104
104
  "@types/minimist": "1.2.5",
105
- "@types/node": "20.12.12",
105
+ "@types/node": "22.18.0",
106
106
  "chalk": "^4.1.2",
107
107
  "cross-env": "7.0.3",
108
108
  "eslint-plugin-cypress": "4.1.0",
@@ -33,6 +33,7 @@ import {
33
33
  } from "../core-engine";
34
34
  import { A11yReferenceEnum } from "@uuv/a11y";
35
35
  import { expectTableToHaveContent, pressKey, removeHeaderSeparatorLine } from "./../_.common";
36
+ import { getRole } from "dom-accessibility-api";
36
37
 
37
38
  /**
38
39
  * Navigate to the Uri passed as a argument (full url consisting of the BASE_URL + Uri) or navigate to Url if begin with http:// or https://
@@ -79,6 +80,35 @@ When(`I enter the value {string}`, function(textToType: string) {
79
80
  type(textToType);
80
81
  });
81
82
 
83
+ /**
84
+ * Writes the sentence passed as a parameter in the ag-Grid cell at the specified row and column name (useful for example to fill in a form field in ag-Grid).<br/>Make sure you've selected an ag-Grid element beforehand with the <strong>within...</strong> phrases.
85
+ * */
86
+ When(`I type the sentence {string} in aggrid cell at the row {int} and column named {string}`, function(textToType: string, lineNumber: number, columnName: string) {
87
+ cy.uuvCheckContextWithinFocusedElement().then(context => {
88
+ context.withinFocusedElement!.then(focusedElement => {
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"]);
91
+
92
+ cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
93
+ .uuvFoundedElement()
94
+ .then(colmunHeaderElement => {
95
+
96
+ // Retrieve column index
97
+ const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
98
+ cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
99
+ cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
100
+ // Double click on the cell
101
+ cy.wrap(cells[columnIndex]).dblclick();
102
+
103
+ // Type text in the cell
104
+ cy.findByLabelText("Input Editor").type(textToType);
105
+ });
106
+ });
107
+ });
108
+ });
109
+ });
110
+ });
111
+
82
112
  /**
83
113
  * Select the combo box option passed as a parameter (useful for example to fill in a combobox form field).<br/>Make sure you've selected a combo box element beforehand with the <strong>within a combo box named 'yourComboboxNamee'</strong> phrases.
84
114
  * */
@@ -33,6 +33,7 @@ import {
33
33
  } from "../core-engine";
34
34
  import { A11yReferenceEnum } from "@uuv/a11y";
35
35
  import { expectTableToHaveContent, pressKey, removeHeaderSeparatorLine } from "./../_.common";
36
+ import { getRole } from "dom-accessibility-api";
36
37
 
37
38
  /**
38
39
  * Navigue vers l'Uri passé en paramètre (url complète étant constituée de la BASE_URL + Uri) ou navigue vers l'Url si ça commence par http:// ou https://
@@ -66,7 +67,7 @@ When(`je clique sur l'élément avec le rôle {string} et le nom {string}`, func
66
67
  });
67
68
 
68
69
  /**
69
- * Saisit de la phrase passée en paramètre (utile par exemple pour remplir un champ de formulaire).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
70
+ * Saisie de la phrase passée en paramètre (utile par exemple pour remplir un champ de formulaire).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
70
71
  * */
71
72
  When(`je saisie le(s) mot(s) {string}`, function(textToType: string) {
72
73
  type(textToType);
@@ -79,6 +80,35 @@ When(`j'entre la valeur {string}`, function(textToType: string) {
79
80
  type(textToType);
80
81
  });
81
82
 
83
+ /**
84
+ * Saisie de la phrase passée en paramètre dans une cellule d'une grille ag-Grid (utile par exemple pour remplir une cellule dans une grille).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur...</strong>.
85
+ * */
86
+ When(`je saisie le(s) mot(s) {string} dans la cellule aggrid à la ligne {int} et la colonne nommée {string}`, function(textToType: string, lineNumber: number, columnName: string) {
87
+ cy.uuvCheckContextWithinFocusedElement().then(context => {
88
+ context.withinFocusedElement!.then(focusedElement => {
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"]);
91
+
92
+ cy.wrap(focusedElement).findByRole("columnheader", { name: columnName })
93
+ .uuvFoundedElement()
94
+ .then(colmunHeaderElement => {
95
+
96
+ // Retrieve column index
97
+ const columnIndex = Number(colmunHeaderElement.get(0).getAttribute("aria-colindex")) - 1;
98
+ cy.wrap(focusedElement).findAllByRole("row").then((rows) => {
99
+ cy.wrap(rows[lineNumber]).findAllByRole("gridcell").then((cells) => {
100
+ // Double click on the cell
101
+ cy.wrap(cells[columnIndex]).dblclick();
102
+
103
+ // Type text in the cell
104
+ cy.findByLabelText("Input Editor").type(textToType);
105
+ });
106
+ });
107
+ });
108
+ });
109
+ });
110
+ });
111
+
82
112
  /**
83
113
  * Sélectionne l'option passée en paramètre (utile par exemple pour remplir un champ le liste déroulante).<br/>Assurez vous d'avoir effectué une sélection d'élément avant avec les phrases <strong>je vais à l'intérieur de la liste déroulante nommée 'maListeDeroulante'</strong>.
84
114
  * */