@dhis2-ui/cover 9.4.3 → 9.4.5
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a Cover with children is rendered', () => {
|
|
6
6
|
cy.visitStory('Cover', 'With Children');
|
|
7
7
|
cy.get('[data-test="dhis2-uicore-componentcover"]').should('be.visible');
|
|
8
8
|
});
|
|
9
|
-
(0,
|
|
9
|
+
(0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
|
|
10
10
|
cy.contains('I am a child').should('be.visible');
|
|
11
11
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a Cover with a button below it is rendered', () => {
|
|
6
6
|
cy.visitStory('Cover', 'Blocking');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Given)('a Cover with a button in it is rendered', () => {
|
|
9
9
|
cy.visitStory('Cover', 'With Click Handler');
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
11
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks the button', () => {
|
|
12
12
|
cy.get('button').click();
|
|
13
13
|
});
|
|
14
|
-
(0,
|
|
14
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks on the Cover', () => {
|
|
15
15
|
cy.get('[data-test="dhis2-uicore-componentcover"]').click();
|
|
16
16
|
});
|
|
17
|
-
(0,
|
|
17
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks on the button coordinates', () => {
|
|
18
18
|
cy.getPositionsBySelectors('button').then(_ref => {
|
|
19
19
|
let [rect] = _ref;
|
|
20
20
|
// Get button center coordinates
|
|
@@ -24,22 +24,22 @@ var _steps = require("cypress-cucumber-preprocessor/steps");
|
|
|
24
24
|
cy.get('body').click(buttonCenterX, buttonCenterY);
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
(0,
|
|
27
|
+
(0, _cypressCucumberPreprocessor.Then)('the onClick handler of the button is called', () => {
|
|
28
28
|
cy.window().should(win => {
|
|
29
29
|
expect(win.onButtonClick).to.be.calledOnce;
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
(0,
|
|
32
|
+
(0, _cypressCucumberPreprocessor.Then)('the onClick handler of the Cover is called', () => {
|
|
33
33
|
cy.window().should(win => {
|
|
34
34
|
expect(win.onCover).to.be.calledOnce;
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
|
-
(0,
|
|
37
|
+
(0, _cypressCucumberPreprocessor.Then)('the onClick handler of the button is not called', () => {
|
|
38
38
|
cy.window().should(win => {
|
|
39
39
|
expect(win.onButtonClick).to.have.callCount(0);
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
(0,
|
|
42
|
+
(0, _cypressCucumberPreprocessor.Then)('the onClick handler of the Cover is not called', () => {
|
|
43
43
|
cy.window().should(win => {
|
|
44
44
|
expect(win.onCover).to.have.callCount(0);
|
|
45
45
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Given, Then } from 'cypress-cucumber-preprocessor
|
|
1
|
+
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
|
|
2
2
|
Given('a Cover with children is rendered', () => {
|
|
3
3
|
cy.visitStory('Cover', 'With Children');
|
|
4
4
|
cy.get('[data-test="dhis2-uicore-componentcover"]').should('be.visible');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/cover",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.5",
|
|
4
4
|
"description": "UI Cover",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2/ui-constants": "9.4.
|
|
36
|
+
"@dhis2/ui-constants": "9.4.5",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|