@uuv/playwright 2.15.0 → 2.17.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.
Files changed (79) hide show
  1. package/dist/cucumber/step_definitions/playwright/generated/_en-generated-cucumber-steps-definition.js +25 -1
  2. package/dist/cucumber/step_definitions/playwright/generated/_fr-generated-cucumber-steps-definition.js +25 -1
  3. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_button.js +14 -0
  4. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_checkbox.js +14 -0
  5. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_combobox.js +14 -0
  6. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_link.js +14 -0
  7. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_listbox.js +14 -0
  8. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitem.js +14 -0
  9. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitemcheckbox.js +14 -0
  10. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitemradio.js +14 -0
  11. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_radio.js +14 -0
  12. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_search.js +14 -0
  13. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_searchbox.js +14 -0
  14. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_select.js +14 -0
  15. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_slider.js +14 -0
  16. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_spinbutton.js +14 -0
  17. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_switch.js +14 -0
  18. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_tab.js +14 -0
  19. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_textbox.js +14 -0
  20. package/dist/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_widget.js +14 -0
  21. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_button.js +15 -1
  22. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_checkbox.js +15 -1
  23. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_combobox.js +15 -1
  24. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_link.js +15 -1
  25. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_listbox.js +15 -1
  26. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitem.js +15 -1
  27. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitemcheckbox.js +15 -1
  28. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitemradio.js +15 -1
  29. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_radio.js +15 -1
  30. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_search.js +15 -1
  31. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_searchbox.js +15 -1
  32. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_select.js +15 -1
  33. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_slider.js +15 -1
  34. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_spinbutton.js +15 -1
  35. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_switch.js +15 -1
  36. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_tab.js +15 -1
  37. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_textbox.js +15 -1
  38. package/dist/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_widget.js +15 -1
  39. package/dist/lib/runner-playwright.js +1 -1
  40. package/package.json +6 -6
  41. package/src/cucumber/step_definitions/playwright/generated/_en-generated-cucumber-steps-definition.ts +31 -1
  42. package/src/cucumber/step_definitions/playwright/generated/_fr-generated-cucumber-steps-definition.ts +31 -1
  43. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_button.ts +21 -0
  44. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_checkbox.ts +21 -0
  45. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_combobox.ts +21 -0
  46. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_link.ts +21 -0
  47. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_listbox.ts +21 -0
  48. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitem.ts +21 -0
  49. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitemcheckbox.ts +21 -0
  50. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_menuitemradio.ts +21 -0
  51. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_radio.ts +21 -0
  52. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_search.ts +21 -0
  53. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_searchbox.ts +21 -0
  54. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_select.ts +21 -0
  55. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_slider.ts +21 -0
  56. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_spinbutton.ts +21 -0
  57. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_switch.ts +21 -0
  58. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_tab.ts +21 -0
  59. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_textbox.ts +21 -0
  60. package/src/cucumber/step_definitions/playwright/generated/enriched/en/_en-generated-steps-definition_widget.ts +21 -0
  61. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_button.ts +22 -1
  62. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_checkbox.ts +22 -1
  63. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_combobox.ts +22 -1
  64. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_link.ts +22 -1
  65. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_listbox.ts +22 -1
  66. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitem.ts +22 -1
  67. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitemcheckbox.ts +22 -1
  68. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_menuitemradio.ts +22 -1
  69. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_radio.ts +22 -1
  70. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_search.ts +22 -1
  71. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_searchbox.ts +22 -1
  72. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_select.ts +22 -1
  73. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_slider.ts +22 -1
  74. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_spinbutton.ts +22 -1
  75. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_switch.ts +22 -1
  76. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_tab.ts +22 -1
  77. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_textbox.ts +22 -1
  78. package/src/cucumber/step_definitions/playwright/generated/enriched/fr/_fr-generated-steps-definition_widget.ts +22 -1
  79. package/target-config/cucumber.cjs +0 -1
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un élément de menu nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitem", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un élément de menu nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitem", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un élément de menu nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitem", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un menu d'élément de boîte à choix nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemcheckbox", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un menu d'élément de boîte à choix nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemcheckbox", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un menu d'élément de boîte à choix nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemcheckbox", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un menu d'élement de bouton radio nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemradio", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un menu d'élement de bouton radio nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemradio", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un menu d'élement de bouton radio nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "menuitemradio", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un bouton radio nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "radio", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un bouton radio nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "radio", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un bouton radio nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "radio", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir une recherche nommée {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "search", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être une recherche nommée {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "search", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être une recherche nommée {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "search", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir une boîte de recherche nommée {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "searchbox", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être une boîte de recherche nommée {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "searchbox", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être une boîte de recherche nommée {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "searchbox", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un sélecteur nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "select", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un sélecteur nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "select", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un sélecteur nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "select", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un curseur nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "slider", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un curseur nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "slider", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un curseur nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "slider", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un bouton rotatif nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "spinbutton", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un bouton rotatif nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "spinbutton", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un bouton rotatif nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "spinbutton", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un interrupteur nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "switch", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un interrupteur nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "switch", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un interrupteur nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "switch", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un onglet nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "tab", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un onglet nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "tab", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un onglet nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "tab", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir une boîte à texte nommée {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "textbox", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être une boîte à texte nommée {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "textbox", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être une boîte à texte nommée {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "textbox", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -74,9 +74,23 @@ const test_1 = require("@playwright/test");
74
74
  // End of Content Section
75
75
  // Begin of Keyboard Section
76
76
  /**
77
- * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) est focus
77
+ * Vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
78
78
  * */
79
79
  (0, cucumber_1.Then)(`je dois voir un widget nommé {string} avoir le focus clavier`, async function (name) {
80
80
  await (0, core_engine_1.findWithRoleAndNameFocused)(this, "widget", name);
81
81
  });
82
+ /**
83
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
84
+ * */
85
+ (0, cucumber_1.Then)(`le précédent élément avec le focus clavier doit être un widget nommé {string}`, async function (name) {
86
+ await this.page.keyboard.press("ShiftLeft+Tab");
87
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "widget", name);
88
+ });
89
+ /**
90
+ * Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
91
+ * */
92
+ (0, cucumber_1.Then)(`le prochain élément avec le focus clavier doit être un widget nommé {string}`, async function (name) {
93
+ await this.page.keyboard.press("Tab");
94
+ await (0, core_engine_1.findWithRoleAndNameFocused)(this, "widget", name);
95
+ });
82
96
  // End of Keyboard Section
@@ -85,7 +85,7 @@ class UUVCliPlaywrightRunner {
85
85
  this.runPlaywright(options);
86
86
  }
87
87
  executeOpenCommand(options) {
88
- child_process_1.default.fork(path_1.default.join(__dirname, "watch-test-files"), [this.tempDir, this.projectDir, options.extraArgs.TAGS]);
88
+ child_process_1.default.fork(path_1.default.join(__dirname, "watch-test-files"), [this.tempDir, this.projectDir]);
89
89
  this.runPlaywright(options);
90
90
  }
91
91
  getTargetTestFileForPlaywright(targetTestFile) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/playwright",
3
- "version": "2.15.0",
3
+ "version": "2.17.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",
@@ -36,7 +36,7 @@
36
36
  "generate:step-definitions": "ts-node generate-step-definitions.ts",
37
37
  "package": "npm pack --pack-destination=\"../../dist/packages\"",
38
38
  "postinstall": "node postinstall.js",
39
- "unit-test": "jest --runInBand --coverage --config=./jest.config.ts",
39
+ "unit-tests": "jest --runInBand --coverage --config=./jest.config.ts",
40
40
  "e2e-test:run": "ts-node test.ts e2e",
41
41
  "e2e-test:open": "ts-node test.ts open --",
42
42
  "test": "npm run unit-test && npm run e2e-test:run"
@@ -44,8 +44,8 @@
44
44
  "dependencies": {
45
45
  "@cucumber/cucumber": "9.6.0",
46
46
  "@cucumber/tag-expressions": "^6.0.0",
47
- "@playwright/test": "1.44.0",
48
- "@uuv/runner-commons": "2.14.0",
47
+ "@playwright/test": "1.44.1",
48
+ "@uuv/runner-commons": "2.16.0",
49
49
  "axe-core": "4.9.1",
50
50
  "axe-playwright": "2.0.1",
51
51
  "chalk-table": "^1.0.2",
@@ -87,12 +87,12 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/minimist": "1.2.5",
90
- "@types/node": "20.12.11",
90
+ "@types/node": "20.12.12",
91
91
  "chalk": "^4.1.2",
92
92
  "cross-env": "7.0.3",
93
93
  "eslint-plugin-cucumber": "2.0.0",
94
94
  "eslint-plugin-jest": "27.9.0",
95
- "eslint-plugin-playwright": "1.6.0",
95
+ "eslint-plugin-playwright": "1.6.2",
96
96
  "ts-loader": "9.4.2",
97
97
  "tsconfig-paths": "4.2.0",
98
98
  "webpack": "5.90.3"
@@ -68,7 +68,6 @@ Given(
68
68
  `I start a keyboard navigation from the top of the page`,
69
69
  async function(this: World) {
70
70
  await this.page.mouse.click(0.5, 0.5);
71
- await this.page.keyboard.press("Tab");
72
71
  }
73
72
  );
74
73
 
@@ -427,6 +426,20 @@ Then(
427
426
  }
428
427
  );
429
428
 
429
+ /**
430
+ * Checks that the Html element with the specified selector is focused
431
+ * */
432
+ Then(
433
+ `the element with selector {string} should be keyboard focused`,
434
+ async function(this: World, selector: string) {
435
+ await getPageOrElement(this).then( async(element) => {
436
+ const locator = element.locator(selector);
437
+ await locator.focus({ timeout: 10000 });
438
+ await expect(locator).toHaveCount(1);
439
+ await expect(locator).toBeFocused();
440
+ });
441
+ });
442
+
430
443
  /**
431
444
  * 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
432
445
  * */
@@ -475,6 +488,23 @@ Then(`I should see an element with aria-label {string} and content {string}`, as
475
488
  });
476
489
  });
477
490
 
491
+ /**
492
+ * Move to the previous html element that can be reached with Tab and checks that the Html element 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/) is focused
493
+ * */
494
+ When(`the previous keyboard element focused should have name {string} and role {string}`, async function(this: World, expectedRole: string, name: string) {
495
+ await this.page.keyboard.press("ShiftLeft+Tab");
496
+ await findWithRoleAndNameFocused(this, expectedRole, name);
497
+ });
498
+
499
+ /**
500
+ * "Move to the next html element that can be reached with Tab and checks that the Html element 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/) is focused
501
+ * */
502
+ When(`the next keyboard element focused should have name {string} and role {string}`, async function(this: World, expectedRole: string, name: string) {
503
+ await this.page.keyboard.press("Tab");
504
+ await findWithRoleAndNameFocused(this, expectedRole, name);
505
+ });
506
+
507
+
478
508
  /**
479
509
  * Wait that a named mock has been consumed until timeout
480
510
  * */
@@ -68,7 +68,6 @@ Given(
68
68
  `je commence une navigation au clavier depuis le haut de la page`,
69
69
  async function(this: World) {
70
70
  await this.page.mouse.click(0.5, 0.5);
71
- await this.page.keyboard.press("Tab");
72
71
  }
73
72
  );
74
73
 
@@ -427,6 +426,20 @@ Then(
427
426
  }
428
427
  );
429
428
 
429
+ /**
430
+ * Vérifie que l'élément Html avec le sélecteur est focus
431
+ * */
432
+ Then(
433
+ `l'élément avec le sélecteur {string} doit avoir le focus clavier`,
434
+ async function(this: World, selector: string) {
435
+ await getPageOrElement(this).then( async(element) => {
436
+ const locator = element.locator(selector);
437
+ await locator.focus({ timeout: 10000 });
438
+ await expect(locator).toHaveCount(1);
439
+ await expect(locator).toBeFocused();
440
+ });
441
+ });
442
+
430
443
  /**
431
444
  * Vérifie qu'un élément Html existe avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) et le contenu spécifiés, et avec l'attribut disabled à true
432
445
  * */
@@ -475,6 +488,23 @@ Then(`je dois voir un élément ayant pour aria-label {string} et pour contenu {
475
488
  });
476
489
  });
477
490
 
491
+ /**
492
+ * Se déplace au précédent élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
493
+ * */
494
+ When(`le précédent élément avec le focus clavier doit avoir le role {string} et le nom {string}`, async function(this: World, expectedRole: string, name: string) {
495
+ await this.page.keyboard.press("ShiftLeft+Tab");
496
+ await findWithRoleAndNameFocused(this, expectedRole, name);
497
+ });
498
+
499
+ /**
500
+ * "Se déplace au prochain élément HTML atteignable avec la tabulation et vérifie que l'élément Html avec le [rôle accessible](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) et le [nom accessible](https://russmaxdesign.github.io/html-elements-names/) a le focus clavier
501
+ * */
502
+ When(`le prochain élément avec le focus clavier doit avoir le role {string} et le nom {string}`, async function(this: World, expectedRole: string, name: string) {
503
+ await this.page.keyboard.press("Tab");
504
+ await findWithRoleAndNameFocused(this, expectedRole, name);
505
+ });
506
+
507
+
478
508
  /**
479
509
  * Vérifie qu'un bouchon nommé ait bien été consommé
480
510
  * */
@@ -118,4 +118,25 @@ Then(
118
118
  }
119
119
  );
120
120
 
121
+ /**
122
+ * Move to the previous html element that can be reached with Tab and checks that the Html element 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/) is focused
123
+ * */
124
+ Then(
125
+ `the previous keyboard element focused should be a button named {string}`,
126
+ async function (this: World, name: string) {
127
+ await this.page.keyboard.press("ShiftLeft+Tab");
128
+ await findWithRoleAndNameFocused(this, "button", name);
129
+ }
130
+ );
131
+
132
+ /**
133
+ * Move to the next html element that can be reached with Tab and checks that the Html element 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/) is focused
134
+ * */
135
+ Then(
136
+ `the next keyboard element focused should be a button named {string}`,
137
+ async function (this: World, name: string) {
138
+ await this.page.keyboard.press("Tab");
139
+ await findWithRoleAndNameFocused(this, "button", name);
140
+ }
141
+ );
121
142
  // End of Keyboard Section
@@ -118,4 +118,25 @@ Then(
118
118
  }
119
119
  );
120
120
 
121
+ /**
122
+ * Move to the previous html element that can be reached with Tab and checks that the Html element 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/) is focused
123
+ * */
124
+ Then(
125
+ `the previous keyboard element focused should be a checkbox named {string}`,
126
+ async function (this: World, name: string) {
127
+ await this.page.keyboard.press("ShiftLeft+Tab");
128
+ await findWithRoleAndNameFocused(this, "checkbox", name);
129
+ }
130
+ );
131
+
132
+ /**
133
+ * Move to the next html element that can be reached with Tab and checks that the Html element 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/) is focused
134
+ * */
135
+ Then(
136
+ `the next keyboard element focused should be a checkbox named {string}`,
137
+ async function (this: World, name: string) {
138
+ await this.page.keyboard.press("Tab");
139
+ await findWithRoleAndNameFocused(this, "checkbox", name);
140
+ }
141
+ );
121
142
  // End of Keyboard Section
@@ -118,4 +118,25 @@ Then(
118
118
  }
119
119
  );
120
120
 
121
+ /**
122
+ * Move to the previous html element that can be reached with Tab and checks that the Html element 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/) is focused
123
+ * */
124
+ Then(
125
+ `the previous keyboard element focused should be a combo box named {string}`,
126
+ async function (this: World, name: string) {
127
+ await this.page.keyboard.press("ShiftLeft+Tab");
128
+ await findWithRoleAndNameFocused(this, "combobox", name);
129
+ }
130
+ );
131
+
132
+ /**
133
+ * Move to the next html element that can be reached with Tab and checks that the Html element 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/) is focused
134
+ * */
135
+ Then(
136
+ `the next keyboard element focused should be a combo box named {string}`,
137
+ async function (this: World, name: string) {
138
+ await this.page.keyboard.press("Tab");
139
+ await findWithRoleAndNameFocused(this, "combobox", name);
140
+ }
141
+ );
121
142
  // End of Keyboard Section
@@ -118,4 +118,25 @@ Then(
118
118
  }
119
119
  );
120
120
 
121
+ /**
122
+ * Move to the previous html element that can be reached with Tab and checks that the Html element 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/) is focused
123
+ * */
124
+ Then(
125
+ `the previous keyboard element focused should be a link named {string}`,
126
+ async function (this: World, name: string) {
127
+ await this.page.keyboard.press("ShiftLeft+Tab");
128
+ await findWithRoleAndNameFocused(this, "link", name);
129
+ }
130
+ );
131
+
132
+ /**
133
+ * Move to the next html element that can be reached with Tab and checks that the Html element 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/) is focused
134
+ * */
135
+ Then(
136
+ `the next keyboard element focused should be a link named {string}`,
137
+ async function (this: World, name: string) {
138
+ await this.page.keyboard.press("Tab");
139
+ await findWithRoleAndNameFocused(this, "link", name);
140
+ }
141
+ );
121
142
  // End of Keyboard Section