@centreon/js-config 24.4.15 → 24.4.16
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.
|
@@ -17,6 +17,15 @@ interface MountProps {
|
|
|
17
17
|
Component: React.ReactNode;
|
|
18
18
|
options?: object;
|
|
19
19
|
}
|
|
20
|
+
interface Resolution {
|
|
21
|
+
height: number;
|
|
22
|
+
width: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface MakeSnapshotWithCustomResolution {
|
|
26
|
+
resolution: Resolution;
|
|
27
|
+
title: string;
|
|
28
|
+
}
|
|
20
29
|
|
|
21
30
|
export enum Method {
|
|
22
31
|
DELETE = 'DELETE',
|
|
@@ -148,6 +157,15 @@ Cypress.Commands.add('makeSnapshot', (title?: string) => {
|
|
|
148
157
|
cy.matchImageSnapshot(title);
|
|
149
158
|
});
|
|
150
159
|
|
|
160
|
+
Cypress.Commands.add(
|
|
161
|
+
'makeSnapshotWithCustomResolution',
|
|
162
|
+
({ title, resolution }: MakeSnapshotWithCustomResolution) => {
|
|
163
|
+
const { width, height } = resolution;
|
|
164
|
+
cy.viewport(width, height);
|
|
165
|
+
cy.matchImageSnapshot(title);
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
|
|
151
169
|
Cypress.Commands.add('cssDisableMotion', (): void => {
|
|
152
170
|
Cypress.on('window:before:load', (cyWindow) => {
|
|
153
171
|
disableMotion(cyWindow);
|
|
@@ -165,6 +183,10 @@ declare global {
|
|
|
165
183
|
) => Cypress.Chainable;
|
|
166
184
|
interceptRequest: (method, path, mock, alias) => Cypress.Chainable;
|
|
167
185
|
makeSnapshot: (title?: string) => void;
|
|
186
|
+
makeSnapshotWithCustomResolution: ({
|
|
187
|
+
title,
|
|
188
|
+
resolution
|
|
189
|
+
}: MakeSnapshotWithCustomResolution) => Cypress.Chainable;
|
|
168
190
|
mount: ({ Component, options }: MountProps) => Cypress.Chainable;
|
|
169
191
|
moveSortableElement: ({
|
|
170
192
|
element,
|
package/package.json
CHANGED