@uuv/playwright 2.1.0 → 2.2.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/README.md CHANGED
@@ -44,6 +44,10 @@ A solution to facilitate the writing and execution of E2E tests understandable b
44
44
  <img alt="@uuv/assistant npm library download count"
45
45
  src="https://img.shields.io/npm/dt/%40uuv/assistant?logo=npm&label=%40uuv%2Fassistant"></img>
46
46
  </a>
47
+ <a href="https://www.npmjs.com/package/@uuv/a11y" target="_blank">
48
+ <img alt="@uuv/a11y npm library download count"
49
+ src="https://img.shields.io/npm/dt/%40uuv/a11y?logo=npm&label=%40uuv%2Fa11y"></img>
50
+ </a>
47
51
  <a href="https://plugins.jetbrains.com/plugin/22437-uuv" target="_blank">
48
52
  <img alt="JetBrains Plugin Downloads" src="https://img.shields.io/jetbrains/plugin/d/22437-uuv?logo=jetbrains&label=UUV%20plugin"></img>
49
53
  </a>
@@ -143,11 +143,11 @@ const path_1 = __importDefault(require("path"));
143
143
  testId = encodeURIComponent(testId);
144
144
  await (0, core_engine_1.getPageOrElement)(this).then((element) => (0, test_1.expect)(element.getByTestId(testId, { exact: true })).toHaveCount(0));
145
145
  });
146
- (0, cucumber_1.Then)(`I should not have any accessibility issue`, async function () {
146
+ (0, cucumber_1.Then)(`I should not have any axe-core accessibility issue`, async function () {
147
147
  await (0, axe_playwright_1.injectAxe)(this.page);
148
148
  await (0, axe_playwright_1.checkA11y)(this.page);
149
149
  });
150
- (0, cucumber_1.Then)(`I should not have any accessibility issue with option json fixture {}`, async function (option) {
150
+ (0, cucumber_1.Then)(`I should not have any axe-core accessibility issue with option json fixture {}`, async function (option) {
151
151
  await (0, axe_playwright_1.injectAxe)(this.page);
152
152
  const optionFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${option}`));
153
153
  const optionJson = JSON.parse(optionFile.toString());
@@ -156,9 +156,10 @@ const path_1 = __importDefault(require("path"));
156
156
  });
157
157
  });
158
158
  function getConfigDir() {
159
+ // eslint-disable-next-line dot-notation
159
160
  return process.env["CONFIG_DIR"] ? process.env["CONFIG_DIR"] : "";
160
161
  }
161
- (0, cucumber_1.Then)(`I should not have any accessibility issue with context json fixture {} and option json fixture {}`, async function (context, option) {
162
+ (0, cucumber_1.Then)(`I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}`, async function (context, option) {
162
163
  await (0, axe_playwright_1.injectAxe)(this.page);
163
164
  const contextFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${context}`));
164
165
  const optionFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${option}`));
@@ -167,19 +168,19 @@ function getConfigDir() {
167
168
  axeOptions: optionJson
168
169
  });
169
170
  });
170
- (0, cucumber_1.Then)(`I should not have any critical accessibility issue`, async function () {
171
+ (0, cucumber_1.Then)(`I should not have any axe-core critical accessibility issue`, async function () {
171
172
  await (0, axe_playwright_1.injectAxe)(this.page);
172
173
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
173
174
  includedImpacts: ["critical"]
174
175
  });
175
176
  });
176
- (0, cucumber_1.Then)(`I should not have any accessibility issue with {} impact(s)`, async function (impacts) {
177
+ (0, cucumber_1.Then)(`I should not have any axe-core accessibility issue with {} impact(s)`, async function (impacts) {
177
178
  await (0, axe_playwright_1.injectAxe)(this.page);
178
179
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
179
180
  includedImpacts: [impacts]
180
181
  });
181
182
  });
182
- (0, cucumber_1.Then)(`I should not have any accessibility issue with accessibility standard(s) {}`, async function (tags) {
183
+ (0, cucumber_1.Then)(`I should not have any axe-core accessibility issue with accessibility standard(s) {}`, async function (tags) {
183
184
  await (0, axe_playwright_1.injectAxe)(this.page);
184
185
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
185
186
  axeOptions: {
@@ -143,11 +143,11 @@ const path_1 = __importDefault(require("path"));
143
143
  testId = encodeURIComponent(testId);
144
144
  await (0, core_engine_1.getPageOrElement)(this).then((element) => (0, test_1.expect)(element.getByTestId(testId, { exact: true })).toHaveCount(0));
145
145
  });
146
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité`, async function () {
146
+ (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core`, async function () {
147
147
  await (0, axe_playwright_1.injectAxe)(this.page);
148
148
  await (0, axe_playwright_1.checkA11y)(this.page);
149
149
  });
150
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité avec le fichier json suivant d'option {}`, async function (option) {
150
+ (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core avec le fichier json suivant d'option {}`, async function (option) {
151
151
  await (0, axe_playwright_1.injectAxe)(this.page);
152
152
  const optionFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${option}`));
153
153
  const optionJson = JSON.parse(optionFile.toString());
@@ -156,9 +156,10 @@ const path_1 = __importDefault(require("path"));
156
156
  });
157
157
  });
158
158
  function getConfigDir() {
159
+ // eslint-disable-next-line dot-notation
159
160
  return process.env["CONFIG_DIR"] ? process.env["CONFIG_DIR"] : "";
160
161
  }
161
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité sur le fichier json suivant de contexte {} et avec le fichier json suivant d'option {}`, async function (context, option) {
162
+ (0, cucumber_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 {}`, async function (context, option) {
162
163
  await (0, axe_playwright_1.injectAxe)(this.page);
163
164
  const contextFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${context}`));
164
165
  const optionFile = await runner_commons_1.fs.readFileSync(path_1.default.join(getConfigDir(), `playwright/fixtures/${option}`));
@@ -167,19 +168,19 @@ function getConfigDir() {
167
168
  axeOptions: optionJson
168
169
  });
169
170
  });
170
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité de niveau critique`, async function () {
171
+ (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core de niveau critique`, async function () {
171
172
  await (0, axe_playwright_1.injectAxe)(this.page);
172
173
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
173
174
  includedImpacts: ["critical"]
174
175
  });
175
176
  });
176
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité avec l(es) impact(s) {}`, async function (impacts) {
177
+ (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core avec l(es) impact(s) {}`, async function (impacts) {
177
178
  await (0, axe_playwright_1.injectAxe)(this.page);
178
179
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
179
180
  includedImpacts: [impacts]
180
181
  });
181
182
  });
182
- (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité avec le(s) standard(s) {}`, async function (tags) {
183
+ (0, cucumber_1.Then)(`je ne dois pas avoir de problèmes d'accessibilité axe-core avec le(s) standard(s) {}`, async function (tags) {
183
184
  await (0, axe_playwright_1.injectAxe)(this.page);
184
185
  await (0, axe_playwright_1.checkA11y)(this.page, undefined, {
185
186
  axeOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/playwright",
3
- "version": "2.1.0",
3
+ "version": "2.2.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 playwright",
@@ -47,7 +47,7 @@
47
47
  "@cucumber/cucumber": "9.6.0",
48
48
  "@cucumber/tag-expressions": "^6.0.0",
49
49
  "@playwright/test": "1.33.0",
50
- "@uuv/runner-commons": "2.1.0",
50
+ "@uuv/runner-commons": "2.2.0",
51
51
  "axe-core": "4.8.2",
52
52
  "axe-playwright": "1.2.3",
53
53
  "chalk": "4.1.2",
@@ -208,14 +208,14 @@ Then(`I should not see an element with testId {string}`, async function(this: Wo
208
208
  });
209
209
 
210
210
  Then(
211
- `I should not have any accessibility issue`,
211
+ `I should not have any axe-core accessibility issue`,
212
212
  async function(this: World) {
213
213
  await injectAxe(this.page as Page);
214
214
  await checkA11y(this.page as Page);
215
215
  });
216
216
 
217
217
  Then(
218
- `I should not have any accessibility issue with option json fixture {}`,
218
+ `I should not have any axe-core accessibility issue with option json fixture {}`,
219
219
  async function(this: World, option: any) {
220
220
  await injectAxe(this.page as Page);
221
221
  const optionFile = await fs.readFileSync(path.join(getConfigDir(), `playwright/fixtures/${option}`));
@@ -226,11 +226,12 @@ Then(
226
226
  });
227
227
 
228
228
  function getConfigDir(): string {
229
+ // eslint-disable-next-line dot-notation
229
230
  return process.env["CONFIG_DIR"] ? process.env["CONFIG_DIR"] : "";
230
231
  }
231
232
 
232
233
  Then(
233
- `I should not have any accessibility issue with context json fixture {} and option json fixture {}`,
234
+ `I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}`,
234
235
  async function(this: World, context: any, option: any) {
235
236
  await injectAxe(this.page as Page);
236
237
  const contextFile = await fs.readFileSync(path.join(getConfigDir(), `playwright/fixtures/${context}`));
@@ -242,7 +243,7 @@ Then(
242
243
  });
243
244
 
244
245
  Then(
245
- `I should not have any critical accessibility issue`,
246
+ `I should not have any axe-core critical accessibility issue`,
246
247
  async function(this: World) {
247
248
  await injectAxe(this.page as Page);
248
249
  await checkA11y(this.page as Page, undefined, {
@@ -251,7 +252,7 @@ Then(
251
252
  });
252
253
 
253
254
  Then(
254
- `I should not have any accessibility issue with {} impact(s)`,
255
+ `I should not have any axe-core accessibility issue with {} impact(s)`,
255
256
  async function(this: World, impacts: any) {
256
257
  await injectAxe(this.page as Page);
257
258
  await checkA11y(this.page as Page, undefined, {
@@ -259,7 +260,7 @@ Then(
259
260
  });
260
261
  });
261
262
  Then(
262
- `I should not have any accessibility issue with accessibility standard(s) {}`,
263
+ `I should not have any axe-core accessibility issue with accessibility standard(s) {}`,
263
264
  async function(this: World, tags: any) {
264
265
  await injectAxe(this.page as Page);
265
266
  await checkA11y(this.page as Page, undefined, {
@@ -208,14 +208,14 @@ Then(`je ne dois pas voir un élément ayant pour testId {string}`, async functi
208
208
  });
209
209
 
210
210
  Then(
211
- `je ne dois pas avoir de problèmes d'accessibilité`,
211
+ `je ne dois pas avoir de problèmes d'accessibilité axe-core`,
212
212
  async function(this: World) {
213
213
  await injectAxe(this.page as Page);
214
214
  await checkA11y(this.page as Page);
215
215
  });
216
216
 
217
217
  Then(
218
- `je ne dois pas avoir de problèmes d'accessibilité avec le fichier json suivant d'option {}`,
218
+ `je ne dois pas avoir de problèmes d'accessibilité axe-core avec le fichier json suivant d'option {}`,
219
219
  async function(this: World, option: any) {
220
220
  await injectAxe(this.page as Page);
221
221
  const optionFile = await fs.readFileSync(path.join(getConfigDir(), `playwright/fixtures/${option}`));
@@ -226,11 +226,12 @@ Then(
226
226
  });
227
227
 
228
228
  function getConfigDir(): string {
229
+ // eslint-disable-next-line dot-notation
229
230
  return process.env["CONFIG_DIR"] ? process.env["CONFIG_DIR"] : "";
230
231
  }
231
232
 
232
233
  Then(
233
- `je ne dois pas avoir de problèmes d'accessibilité sur le fichier json suivant de contexte {} et avec le fichier json suivant d'option {}`,
234
+ `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 {}`,
234
235
  async function(this: World, context: any, option: any) {
235
236
  await injectAxe(this.page as Page);
236
237
  const contextFile = await fs.readFileSync(path.join(getConfigDir(), `playwright/fixtures/${context}`));
@@ -242,7 +243,7 @@ Then(
242
243
  });
243
244
 
244
245
  Then(
245
- `je ne dois pas avoir de problèmes d'accessibilité de niveau critique`,
246
+ `je ne dois pas avoir de problèmes d'accessibilité axe-core de niveau critique`,
246
247
  async function(this: World) {
247
248
  await injectAxe(this.page as Page);
248
249
  await checkA11y(this.page as Page, undefined, {
@@ -251,7 +252,7 @@ Then(
251
252
  });
252
253
 
253
254
  Then(
254
- `je ne dois pas avoir de problèmes d'accessibilité avec l(es) impact(s) {}`,
255
+ `je ne dois pas avoir de problèmes d'accessibilité axe-core avec l(es) impact(s) {}`,
255
256
  async function(this: World, impacts: any) {
256
257
  await injectAxe(this.page as Page);
257
258
  await checkA11y(this.page as Page, undefined, {
@@ -259,7 +260,7 @@ Then(
259
260
  });
260
261
  });
261
262
  Then(
262
- `je ne dois pas avoir de problèmes d'accessibilité avec le(s) standard(s) {}`,
263
+ `je ne dois pas avoir de problèmes d'accessibilité axe-core avec le(s) standard(s) {}`,
263
264
  async function(this: World, tags: any) {
264
265
  await injectAxe(this.page as Page);
265
266
  await checkA11y(this.page as Page, undefined, {