@centreon/js-config 23.4.19 → 23.4.20-MON-6488-feature.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.
@@ -70,6 +70,39 @@ Cypress.Commands.add(
70
70
  }
71
71
  );
72
72
 
73
+ Cypress.Commands.add('moveSortableElement', ({ element, direction }): void => {
74
+ const key = `{${direction}arrow}`;
75
+
76
+ element.type(' ', {
77
+ force: true,
78
+ scrollBehavior: false
79
+ });
80
+ element.eq(-1).type(key, {
81
+ scrollBehavior: false
82
+ });
83
+ element.eq(-1).type(' ', {
84
+ scrollBehavior: false
85
+ });
86
+ });
87
+
88
+ Cypress.Commands.add(
89
+ 'moveSortableElementUsingAriaLabel',
90
+ ({ ariaLabel, direction }): void => {
91
+ const key = `{${direction}arrow}`;
92
+
93
+ cy.findByLabelText(ariaLabel).type(' ', {
94
+ force: true,
95
+ scrollBehavior: false
96
+ });
97
+ cy.findAllByLabelText(ariaLabel).eq(-1).type(key, {
98
+ scrollBehavior: false
99
+ });
100
+ cy.findAllByLabelText(ariaLabel).eq(-1).type(' ', {
101
+ scrollBehavior: false
102
+ });
103
+ }
104
+ );
105
+
73
106
  declare global {
74
107
  namespace Cypress {
75
108
  interface Chainable {
@@ -78,6 +111,8 @@ declare global {
78
111
  ) => Cypress.Chainable;
79
112
  interceptRequest: (method, path, mock, alias) => Cypress.Chainable;
80
113
  mount: ({ Component, options = {} }: MountProps) => Cypress.Chainable;
114
+ moveSortableElement: ({ ariaLabel, direction }) => void;
115
+ moveSortableElementUsingAriaLabel: ({ ariaLabel, direction }) => void;
81
116
  waitForRequest: (alias) => Cypress.Chainable;
82
117
  }
83
118
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@centreon/js-config",
3
3
  "description": "Centreon Frontend shared build configuration",
4
- "version": "23.4.19",
4
+ "version": "23.4.20-MON-6488-feature.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"