@centreon/js-config 23.10.26 → 23.10.27
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.
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { mount } from 'cypress/react18';
|
|
5
5
|
import { equals, isNil } from 'ramda';
|
|
6
6
|
|
|
7
|
-
import { Box } from '@mui/material';
|
|
7
|
+
import { Box, CssBaseline } from '@mui/material';
|
|
8
8
|
|
|
9
9
|
import { ThemeProvider } from '@centreon/ui';
|
|
10
10
|
|
|
@@ -36,11 +36,10 @@ Cypress.Commands.add('mount', ({ Component, options = {} }) => {
|
|
|
36
36
|
>
|
|
37
37
|
{Component}
|
|
38
38
|
</Box>
|
|
39
|
+
<CssBaseline />
|
|
39
40
|
</ThemeProvider>
|
|
40
41
|
);
|
|
41
42
|
|
|
42
|
-
document.getElementsByTagName('body')[0].setAttribute('style', 'margin:0px');
|
|
43
|
-
|
|
44
43
|
return mount(wrapped, options);
|
|
45
44
|
});
|
|
46
45
|
|
|
@@ -128,6 +127,11 @@ Cypress.Commands.add(
|
|
|
128
127
|
}
|
|
129
128
|
);
|
|
130
129
|
|
|
130
|
+
Cypress.Commands.add('makeSnapshot', (title?: string) => {
|
|
131
|
+
cy.viewport(1280, 590);
|
|
132
|
+
cy.matchImageSnapshot(title);
|
|
133
|
+
});
|
|
134
|
+
|
|
131
135
|
declare global {
|
|
132
136
|
namespace Cypress {
|
|
133
137
|
interface Chainable {
|
|
@@ -135,6 +139,7 @@ declare global {
|
|
|
135
139
|
props: InterceptAPIRequestProps<T>
|
|
136
140
|
) => Cypress.Chainable;
|
|
137
141
|
interceptRequest: (method, path, mock, alias) => Cypress.Chainable;
|
|
142
|
+
makeSnapshot: (title?: string) => void;
|
|
138
143
|
mount: ({ Component, options }: MountProps) => Cypress.Chainable;
|
|
139
144
|
moveSortableElement: ({ element, direction }) => void;
|
|
140
145
|
moveSortableElementUsingAriaLabel: ({ ariaLabel, direction }) => void;
|
package/package.json
CHANGED