@uuv/runner-commons 2.5.0 → 2.6.1

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,18 @@
1
+ ## [2.6.1](https://github.com/Orange-OpenSource/uuv/compare/runner-commons-v2.6.0...runner-commons-v2.6.1) (2024-02-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update dependency multiple-cucumber-html-reporter to v3.6.2 ([95d85c3](https://github.com/Orange-OpenSource/uuv/commit/95d85c3f29ff261232f75c83175d795b63766a89))
7
+
8
+ ## [2.6.0](https://github.com/Orange-OpenSource/uuv/compare/runner-commons-v2.5.0...runner-commons-v2.6.0) (2024-02-02)
9
+
10
+
11
+ ### Features
12
+
13
+ * rationalize list sentences, [#453](https://github.com/Orange-OpenSource/uuv/issues/453) ([dd98466](https://github.com/Orange-OpenSource/uuv/commit/dd98466f025a61d9ec007001b0a05de2482adef6))
14
+ * setup role based parameters shouldGenerateContainsSentence & shouldGenerateTypeSentence, [#453](https://github.com/Orange-OpenSource/uuv/issues/453) ([613b821](https://github.com/Orange-OpenSource/uuv/commit/613b821fadc70040fbfd4a27cc57b2197cc674bc))
15
+
1
16
  ## [2.5.0](https://github.com/Orange-OpenSource/uuv/compare/runner-commons-v2.4.1...runner-commons-v2.5.0) (2024-01-23)
2
17
 
3
18
 
package/LICENSE CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MIT License
4
4
 
5
- Copyright (c) 2023 Orange
5
+ Copyright (c) 2024 Orange
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy of
8
8
  this software and associated documentation files (the "Software"), to deal in
@@ -3,37 +3,44 @@
3
3
  {
4
4
  "key": "key.when.withinElement.roleAndName",
5
5
  "description": "Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it",
6
- "wording": "within $indefiniteArticle $roleName named {string}"
6
+ "wording": "within $indefiniteArticle $roleName named {string}",
7
+ "section": "general"
7
8
  },
8
9
  {
9
10
  "key": "key.then.element.withRoleAndName",
10
11
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",
11
- "wording": "I should see $indefiniteArticle $roleName named {string}"
12
+ "wording": "I should see $indefiniteArticle $roleName named {string}",
13
+ "section": "general"
12
14
  },
13
15
  {
14
16
  "key": "key.then.element.not.withRoleAndName",
15
17
  "description": "Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",
16
- "wording": "I should not see $indefiniteArticle $roleName named {string}"
18
+ "wording": "I should not see $indefiniteArticle $roleName named {string}",
19
+ "section": "general"
17
20
  },
18
21
  {
19
22
  "key": "key.then.element.withRoleAndNameAndContent",
20
23
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content",
21
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string}"
24
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string}",
25
+ "section": "contains"
22
26
  },
23
27
  {
24
28
  "key": "key.then.element.withRoleAndNameAndContentDisabled",
25
29
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true",
26
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} disabled"
30
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} disabled",
31
+ "section": "contains"
27
32
  },
28
33
  {
29
34
  "key": "key.then.element.withRoleAndNameAndContentEnabled",
30
35
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false",
31
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} enabled"
36
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} enabled",
37
+ "section": "contains"
32
38
  },
33
39
  {
34
40
  "key": "key.when.type",
35
41
  "description": "Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",
36
- "wording": "I type the sentence {string} in $definiteArticle $roleName named {string}"
42
+ "wording": "I type the sentence {string} in $definiteArticle $roleName named {string}",
43
+ "section": "type"
37
44
  }
38
45
  ]
39
46
  }
@@ -12,21 +12,23 @@ var INDEFINITE_ARTICLE;
12
12
  INDEFINITE_ARTICLE["AN"] = "an";
13
13
  })(INDEFINITE_ARTICLE || (INDEFINITE_ARTICLE = {}));
14
14
  class EnAccessibleRole extends accessible_role_1.AccessibleRole {
15
- definiteArticle = DEFINITE_ARTICLE.THE;
16
- indefiniteArticle = INDEFINITE_ARTICLE.A;
17
- constructor(id, name, definiteArticle, indefiniteArticle) {
15
+ id;
16
+ name;
17
+ definiteArticle;
18
+ indefiniteArticle;
19
+ shouldGenerateTypeSentence;
20
+ shouldGenerateContainsSentence;
21
+ constructor(id, name, definiteArticle = DEFINITE_ARTICLE.THE, indefiniteArticle = INDEFINITE_ARTICLE.A, shouldGenerateTypeSentence = true, shouldGenerateContainsSentence = true) {
18
22
  super();
19
23
  this.id = id;
20
24
  this.name = name;
21
- if (definiteArticle) {
22
- this.definiteArticle = definiteArticle;
23
- }
24
- if (indefiniteArticle) {
25
- this.indefiniteArticle = indefiniteArticle;
26
- }
25
+ this.definiteArticle = definiteArticle;
26
+ this.indefiniteArticle = indefiniteArticle;
27
+ this.shouldGenerateTypeSentence = shouldGenerateTypeSentence;
28
+ this.shouldGenerateContainsSentence = shouldGenerateContainsSentence;
27
29
  }
28
30
  static from(input) {
29
- return new EnAccessibleRole(input.id, input.name, input.definiteArticle, input.indefiniteArticle);
31
+ return new EnAccessibleRole(input.id, input.name, input.definiteArticle, input.indefiniteArticle, input.shouldGenerateTypeSentence, input.shouldGenerateContainsSentence);
30
32
  }
31
33
  getDefiniteArticle() {
32
34
  return this.definiteArticle.toString();
@@ -73,7 +75,7 @@ exports.EN_ROLES = [
73
75
  { id: "input", name: "entry", indefiniteArticle: INDEFINITE_ARTICLE.AN },
74
76
  { id: "landmark", name: "landmark" },
75
77
  { id: "link", name: "link" },
76
- { id: "list", name: "list" },
78
+ { id: "list", name: "list", shouldGenerateContainsSentence: false, shouldGenerateTypeSentence: false },
77
79
  { id: "listbox", name: "list box" },
78
80
  { id: "listitem", name: "list item" },
79
81
  { id: "log", name: "log" },
@@ -156,8 +156,8 @@
156
156
  },
157
157
  {
158
158
  "key": "key.then.list.withNameAndContent",
159
- "description": "Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) and content.<br/> See this <a href='https://github.com/Orange-OpenSource/uuv/blob/9e3c9914420c6d527f7ad8b0017a0f8e26250f86/example/weather-app.feature#L17'>example</a>",
160
- "wording": "I should see elements of the list with name {string}"
159
+ "description": "Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\n```gherkin\\nThen I should see a list named \"test-list\" and containing\\n| First element |\\n| Second element |\\n| Third element |\\n```",
160
+ "wording": "I should see a list named {string} and containing"
161
161
  },
162
162
  {
163
163
  "key": "key.then.element.not.withContent",
@@ -14,14 +14,20 @@ var FR_INDEFINITE_ARTICLE;
14
14
  FR_INDEFINITE_ARTICLE["UNE"] = "une";
15
15
  })(FR_INDEFINITE_ARTICLE || (FR_INDEFINITE_ARTICLE = {}));
16
16
  class FrAccessibleRole extends accessible_role_1.AccessibleRole {
17
+ id;
18
+ name;
17
19
  definiteArticle;
18
20
  indefiniteArticle;
19
- constructor(id, name, definiteArticle, indefiniteArticle) {
21
+ shouldGenerateTypeSentence;
22
+ shouldGenerateContainsSentence;
23
+ constructor(id, name, definiteArticle, indefiniteArticle, shouldGenerateTypeSentence = true, shouldGenerateContainsSentence = true) {
20
24
  super();
21
25
  this.id = id;
22
26
  this.name = name;
23
27
  this.definiteArticle = definiteArticle;
24
28
  this.indefiniteArticle = indefiniteArticle;
29
+ this.shouldGenerateTypeSentence = shouldGenerateTypeSentence;
30
+ this.shouldGenerateContainsSentence = shouldGenerateContainsSentence;
25
31
  }
26
32
  getDefiniteArticle() {
27
33
  return this.definiteArticle.toString();
@@ -237,7 +243,9 @@ exports.FR_ROLES = [
237
243
  id: "list",
238
244
  name: "liste",
239
245
  definiteArticle: FR_DEFINITE_ARTICLE.LA,
240
- indefiniteArticle: FR_INDEFINITE_ARTICLE.UNE
246
+ indefiniteArticle: FR_INDEFINITE_ARTICLE.UNE,
247
+ shouldGenerateContainsSentence: false,
248
+ shouldGenerateTypeSentence: false
241
249
  },
242
250
  {
243
251
  id: "listbox",
@@ -557,4 +565,4 @@ exports.FR_ROLES = [
557
565
  definiteArticle: FR_DEFINITE_ARTICLE.LA,
558
566
  indefiniteArticle: FR_INDEFINITE_ARTICLE.UNE
559
567
  }
560
- ].map(role => new FrAccessibleRole(role.id, role.name, role.definiteArticle, role.indefiniteArticle));
568
+ ].map((role) => new FrAccessibleRole(role.id, role.name, role.definiteArticle, role.indefiniteArticle, role.shouldGenerateContainsSentence, role.shouldGenerateContainsSentence));
@@ -1,6 +1,8 @@
1
1
  export declare abstract class AccessibleRole {
2
2
  id: string;
3
3
  name: string;
4
+ shouldGenerateTypeSentence: boolean;
5
+ shouldGenerateContainsSentence: boolean;
4
6
  abstract getDefiniteArticle(): string;
5
7
  abstract getIndefiniteArticle(): string;
6
8
  abstract getOfDefiniteArticle(): string;
@@ -4,5 +4,7 @@ exports.AccessibleRole = void 0;
4
4
  class AccessibleRole {
5
5
  id;
6
6
  name;
7
+ shouldGenerateTypeSentence;
8
+ shouldGenerateContainsSentence;
7
9
  }
8
10
  exports.AccessibleRole = AccessibleRole;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Software Name : UUV
3
3
  *
4
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
4
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
5
5
  * SPDX-License-Identifier: MIT
6
6
  *
7
7
  * This software is distributed under the MIT License,
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Software Name : UUV
4
4
  *
5
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
5
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
6
6
  * SPDX-License-Identifier: MIT
7
7
  *
8
8
  * This software is distributed under the MIT License,
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.BaseStepDefinition = void 0;
27
27
  /**
28
28
  * Software Name : UUV
29
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
29
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
30
30
  * SPDX-License-Identifier: MIT
31
31
  *
32
32
  * This software is distributed under the MIT License,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Software Name : UUV
3
3
  *
4
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
4
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
5
5
  * SPDX-License-Identifier: MIT
6
6
  *
7
7
  * This software is distributed under the MIT License,
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Software Name : UUV
4
4
  *
5
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
5
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
6
6
  * SPDX-License-Identifier: MIT
7
7
  *
8
8
  * This software is distributed under the MIT License,
@@ -91,6 +91,14 @@ class BasedRoleStepDefinition extends common_1.GenerateFileProcessing {
91
91
  .replaceAll("$ofDefiniteArticle", role.getOfDefiniteArticle())
92
92
  .replaceAll(conf.key + ".description", conf.description);
93
93
  });
94
+ // Exclude Role based Content sentence if specified
95
+ if (!role.shouldGenerateContainsSentence) {
96
+ dataUpdated = dataUpdated.replace(/\/\/ Begin of Content Section[\s\S]*?\/\/ End of Content Section/, "");
97
+ }
98
+ // Exclude Role based Type sentence if specified
99
+ if (!role.shouldGenerateTypeSentence) {
100
+ dataUpdated = dataUpdated.replace(/\/\/ Begin of Type Section[\s\S]*?\/\/ End of Type Section/, "");
101
+ }
94
102
  const generatedFilename = generatedFile.replace("$roleId", role.id);
95
103
  // console.debug(">>> data", dataUpdated)
96
104
  // console.debug(">>> generatedFilename", generatedFilename)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Software Name : UUV
3
3
  *
4
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
4
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
5
5
  * SPDX-License-Identifier: MIT
6
6
  *
7
7
  * This software is distributed under the MIT License,
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Software Name : UUV
4
4
  *
5
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
5
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
6
6
  * SPDX-License-Identifier: MIT
7
7
  *
8
8
  * This software is distributed under the MIT License,
@@ -130,17 +130,17 @@ function runGenerateDoc(destDir) {
130
130
  .replaceAll("$namedAdjective", role.namedAdjective())
131
131
  .replaceAll("$ofDefiniteArticle", role.getOfDefiniteArticle());
132
132
  const wordingsEnrichedJson = JSON.parse(dataUpdated);
133
- const { step: enrichedGiven, autocompletionSuggestions: enrichedGivenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.given", undefined, "####");
133
+ const { step: enrichedGiven, autocompletionSuggestions: enrichedGivenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.given", undefined, "####", role);
134
134
  if (enrichedGiven.length > 1) {
135
135
  rows.push(...enrichedGiven);
136
136
  autocompletionSuggestions.push(...enrichedGivenAutocompletionSuggestions);
137
137
  }
138
- const { step: enrichedWhen, autocompletionSuggestions: enrichedWhenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.when", undefined, "####");
138
+ const { step: enrichedWhen, autocompletionSuggestions: enrichedWhenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.when", undefined, "####", role);
139
139
  if (enrichedWhen.length > 1) {
140
140
  rows.push(...enrichedWhen);
141
141
  autocompletionSuggestions.push(...enrichedWhenAutocompletionSuggestions);
142
142
  }
143
- const { step: enrichedThen, autocompletionSuggestions: enrichedThenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.then", undefined, "####");
143
+ const { step: enrichedThen, autocompletionSuggestions: enrichedThenAutocompletionSuggestions } = computeStepDefinition(wordingsEnrichedJson.enriched, "key.then", undefined, "####", role);
144
144
  if (enrichedThen.length > 1) {
145
145
  rows.push(...enrichedThen);
146
146
  autocompletionSuggestions.push(...enrichedThenAutocompletionSuggestions);
@@ -152,17 +152,27 @@ function runGenerateDoc(destDir) {
152
152
  };
153
153
  }
154
154
  /* eslint-disable @typescript-eslint/no-explicit-any */
155
- function computeStepDefinition(wordingsJson, stepKey, stepTitle, level = "###") {
155
+ function computeStepDefinition(wordingsJson, stepKey, stepTitle, level = "###", role) {
156
156
  const step = [];
157
157
  const autocompletionSuggestion = [];
158
158
  if (stepTitle) {
159
159
  step.push(stepTitle);
160
160
  }
161
161
  wordingsJson.forEach((conf) => {
162
- if (conf.key.startsWith(stepKey)) {
162
+ if (conf.key.startsWith(stepKey) && shouldGenerate(conf, role)) {
163
163
  const wording = `${level} ${conf.wording}`;
164
164
  step.push(wording);
165
- step.push(`> ${conf.description ?? ""}\n`);
165
+ conf.description?.split("\\n").forEach((descriptionLine, index, array) => {
166
+ if (index === 0) {
167
+ step.push(`> ${descriptionLine ?? ""}`);
168
+ }
169
+ else if (index === array.length - 1) {
170
+ step.push(` ${descriptionLine ?? ""}\n`);
171
+ }
172
+ else {
173
+ step.push(` ${descriptionLine ?? ""}`);
174
+ }
175
+ });
166
176
  autocompletionSuggestion.push({
167
177
  suggestion: conf.wording
168
178
  .replaceAll("\\", ""),
@@ -182,6 +192,19 @@ function runGenerateDoc(destDir) {
182
192
  autocompletionSuggestions: autocompletionSuggestion
183
193
  };
184
194
  }
195
+ function shouldGenerate(wordingsConf, role) {
196
+ if (role === undefined) {
197
+ return true;
198
+ }
199
+ switch (wordingsConf.section) {
200
+ case "contains":
201
+ return role.shouldGenerateContainsSentence;
202
+ case "type":
203
+ return role.shouldGenerateTypeSentence;
204
+ default:
205
+ return true;
206
+ }
207
+ }
185
208
  function writeWordingFile(generatedFile, data, lang, indexOfFile) {
186
209
  fs_1.default.writeFileSync(generatedFile, data);
187
210
  console.log(`[WRITE] ${indexOfFile}-${lang}-generated-wording-description.md written successfully`);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Software Name : UUV
3
3
  *
4
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
4
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
5
5
  * SPDX-License-Identifier: MIT
6
6
  *
7
7
  * This software is distributed under the MIT License,
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Software Name : UUV
4
4
  *
5
- * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
5
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2024 Orange
6
6
  * SPDX-License-Identifier: MIT
7
7
  *
8
8
  * This software is distributed under the MIT License,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/runner-commons",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
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 common lib for uuv",
@@ -3,37 +3,44 @@
3
3
  {
4
4
  "key": "key.when.withinElement.roleAndName",
5
5
  "description": "Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it",
6
- "wording": "within $indefiniteArticle $roleName named {string}"
6
+ "wording": "within $indefiniteArticle $roleName named {string}",
7
+ "section": "general"
7
8
  },
8
9
  {
9
10
  "key": "key.then.element.withRoleAndName",
10
11
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",
11
- "wording": "I should see $indefiniteArticle $roleName named {string}"
12
+ "wording": "I should see $indefiniteArticle $roleName named {string}",
13
+ "section": "general"
12
14
  },
13
15
  {
14
16
  "key": "key.then.element.not.withRoleAndName",
15
17
  "description": "Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",
16
- "wording": "I should not see $indefiniteArticle $roleName named {string}"
18
+ "wording": "I should not see $indefiniteArticle $roleName named {string}",
19
+ "section": "general"
17
20
  },
18
21
  {
19
22
  "key": "key.then.element.withRoleAndNameAndContent",
20
23
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content",
21
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string}"
24
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string}",
25
+ "section": "contains"
22
26
  },
23
27
  {
24
28
  "key": "key.then.element.withRoleAndNameAndContentDisabled",
25
29
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true",
26
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} disabled"
30
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} disabled",
31
+ "section": "contains"
27
32
  },
28
33
  {
29
34
  "key": "key.then.element.withRoleAndNameAndContentEnabled",
30
35
  "description": "Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false",
31
- "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} enabled"
36
+ "wording": "I should see $indefiniteArticle $roleName named {string} and containing {string} enabled",
37
+ "section": "contains"
32
38
  },
33
39
  {
34
40
  "key": "key.when.type",
35
41
  "description": "Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",
36
- "wording": "I type the sentence {string} in $definiteArticle $roleName named {string}"
42
+ "wording": "I type the sentence {string} in $definiteArticle $roleName named {string}",
43
+ "section": "type"
37
44
  }
38
45
  ]
39
46
  }
@@ -156,8 +156,8 @@
156
156
  },
157
157
  {
158
158
  "key": "key.then.list.withNameAndContent",
159
- "description": "Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) and content.<br/> See this <a href='https://github.com/Orange-OpenSource/uuv/blob/9e3c9914420c6d527f7ad8b0017a0f8e26250f86/example/weather-app.feature#L17'>example</a>",
160
- "wording": "I should see elements of the list with name {string}"
159
+ "description": "Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\n```gherkin\\nThen I should see a list named \"test-list\" and containing\\n| First element |\\n| Second element |\\n| Third element |\\n```",
160
+ "wording": "I should see a list named {string} and containing"
161
161
  },
162
162
  {
163
163
  "key": "key.then.element.not.withContent",
@@ -3,37 +3,44 @@
3
3
  {
4
4
  "key": "key.when.withinElement.roleAndName",
5
5
  "description": "Sélectionne l'élément ayant le rôle $roleId et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) sont spécifiés <br />⚠ pensez à déselectionner l'élement avec <b>[je reinitialise le contexte](#je-reinitialise-le-contexte)</b> si vous n'agissez plus dessus",
6
- "wording": "je vais à l'intérieur $ofDefiniteArticle$roleName $namedAdjective {string}"
6
+ "wording": "je vais à l'intérieur $ofDefiniteArticle$roleName $namedAdjective {string}",
7
+ "section": "general"
7
8
  },
8
9
  {
9
10
  "key": "key.then.element.withRoleAndName",
10
11
  "description": "Vérifie l'existence d'un élément Html ayant le rôle $roleId et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) spécifiés",
11
- "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string}"
12
+ "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string}",
13
+ "section": "general"
12
14
  },
13
15
  {
14
16
  "key": "key.then.element.not.withRoleAndName",
15
17
  "description": "Vérifie l'inexistence d'un élément Html ayant le rôle $roleId et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) spécifiés",
16
- "wording": "je ne dois pas voir $indefiniteArticle $roleName $namedAdjective {string}"
18
+ "wording": "je ne dois pas voir $indefiniteArticle $roleName $namedAdjective {string}",
19
+ "section": "general"
17
20
  },
18
21
  {
19
22
  "key": "key.then.element.withRoleAndNameAndContent",
20
23
  "description": "Vérifie l'existence d'un élément Html ayant le rôle $roleId, le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) et le contenu spécifiés",
21
- "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string}"
24
+ "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string}",
25
+ "section": "contains"
22
26
  },
23
27
  {
24
28
  "key": "key.then.element.withRoleAndNameAndContentDisabled",
25
29
  "description": "Vérifie l'existence d'un élément Html ayant le rôle $roleId, le [nom accessible](https://russmaxdesign.github.io/html-elements-names/), le contenu spécifiés et avec l'attribut disabled à false",
26
- "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string} inactif"
30
+ "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string} inactif",
31
+ "section": "contains"
27
32
  },
28
33
  {
29
34
  "key": "key.then.element.withRoleAndNameAndContentEnabled",
30
35
  "description": "Vérifie l'existence d'un élément Html ayant le rôle $roleId, le [nom accessible](https://russmaxdesign.github.io/html-elements-names/), le contenu spécifiés et avec l'attribut disabled à true",
31
- "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string} actif"
36
+ "wording": "je dois voir $indefiniteArticle $roleName $namedAdjective {string} et contenant {string} actif",
37
+ "section": "contains"
32
38
  },
33
39
  {
34
40
  "key": "key.when.type",
35
41
  "description": "Saisie de la phrase passée en paramètre dans le champ spécifié(utile par exemple pour remplir un champ de formulaire).",
36
- "wording": "je saisie le(s) mot(s) {string} dans $definiteArticle$roleName $namedAdjective {string}"
42
+ "wording": "je saisie le(s) mot(s) {string} dans $definiteArticle$roleName $namedAdjective {string}",
43
+ "section": "type"
37
44
  }
38
45
  ]
39
46
  }
@@ -156,8 +156,8 @@
156
156
  },
157
157
  {
158
158
  "key": "key.then.list.withNameAndContent",
159
- "description": "Vérifie qu'il existe une liste avec le nom et le contenu spécifiés.<br/>Voici un <a href='https://github.com/Orange-OpenSource/uuv/blob/9e3c9914420c6d527f7ad8b0017a0f8e26250f86/example/weather-app.feature#L17'>exemple</a>",
160
- "wording": "je dois voir des elements de la liste ayant pour nom {string}"
159
+ "description": "Vérifie qu'il existe une liste avec le nom et les éléments de liste spécifiés.<br/> <u>Exemple</u>\\n```gherkin\\nAlors je dois voir une liste nommée \"test-list\" et contenant\\n| Premier élément |\\n| Deuxième élément |\\n| Troisième élément |\\n```",
160
+ "wording": "je dois voir une liste nommée {string} et contenant"
161
161
  },
162
162
  {
163
163
  "key": "key.then.element.not.withContent",