@centreon/js-config 23.10.1-MON-fix-panel-edit-tests.3 → 23.10.1-MON-fix-panel-edit-tests.4

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.
@@ -129,12 +129,34 @@ Cypress.Commands.add(
129
129
 
130
130
  Cypress.Commands.add('makeSnapshot', (title?: string) => {
131
131
  cy.viewport(1280, 590);
132
- cy.matchImageSnapshot(title, { capture: 'runner' });
132
+ cy.matchImageSnapshot(title);
133
+ });
134
+
135
+ Cypress.Commands.add('clearViewport', () => {
136
+ const runnerContainer =
137
+ window.parent.document.getElementsByClassName('iframes-container')[0];
138
+ runnerContainer.setAttribute(
139
+ 'style',
140
+ 'left: 0; top: 0; width: 100%; height: 100%;'
141
+ );
142
+ const sizeContainer =
143
+ window.parent.document.getElementsByClassName('size-container')[0];
144
+ sizeContainer.setAttribute('style', '');
145
+
146
+ const sidebar =
147
+ window.parent.document.getElementsByClassName('reporter-wrap')[0];
148
+ sidebar.setAttribute('style', 'opacity: 0');
149
+
150
+ const header = window.parent.document.querySelector(
151
+ '.runner.container header'
152
+ );
153
+ header.setAttribute('style', 'opacity: 0');
133
154
  });
134
155
 
135
156
  declare global {
136
157
  namespace Cypress {
137
158
  interface Chainable {
159
+ clearViewport: () => void;
138
160
  interceptAPIRequest: <T extends object>(
139
161
  props: InterceptAPIRequestProps<T>
140
162
  ) => Cypress.Chainable;
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.10.1-MON-fix-panel-edit-tests.3",
4
+ "version": "23.10.1-MON-fix-panel-edit-tests.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"