@dhis2-ui/layer 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,10 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a Layer with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Layer with children is rendered', () => {
6
6
  cy.visitStory('Layer', 'Default');
7
7
  });
8
- (0, _steps.Then)('the children are visible', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
9
9
  cy.contains('I am a child').should('be.visible');
10
10
  });
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a Layer with a button below it is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Layer with a button below it is rendered', () => {
6
6
  cy.visitStory('Layer', 'Blocking');
7
7
  });
8
- (0, _steps.Given)('a Layer with a button in it is rendered', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('a Layer with a button in it is rendered', () => {
9
9
  cy.visitStory('Layer', 'With Click Handler');
10
10
  });
11
- (0, _steps.When)('the user clicks the button', () => {
11
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the button', () => {
12
12
  cy.get('button').click();
13
13
  });
14
- (0, _steps.When)('the user clicks on the layer', () => {
14
+ (0, _cypressCucumberPreprocessor.When)('the user clicks on the layer', () => {
15
15
  cy.get('[data-test="dhis2-uicore-layer"]').click();
16
16
  });
17
- (0, _steps.When)('the user clicks on the button coordinates', () => {
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, _steps.Then)('the onClick handler of the button is called', () => {
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, _steps.Then)('the onClick handler of the layer is called', () => {
32
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler of the layer is called', () => {
33
33
  cy.window().should(win => {
34
34
  expect(win.onLayerClick).to.be.calledOnce;
35
35
  });
36
36
  });
37
- (0, _steps.Then)('the onClick handler of the button is not called', () => {
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, _steps.Then)('the onClick handler of the layer is not called', () => {
42
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler of the layer is not called', () => {
43
43
  cy.window().should(win => {
44
44
  expect(win.onLayerClick).to.have.callCount(0);
45
45
  });
@@ -1,56 +1,56 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('two equal sibling Layers are rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('two equal sibling Layers are rendered', () => {
6
6
  cy.visitStory('Layer', 'Equal Siblings');
7
7
  });
8
- (0, _steps.Given)('an alert, blocking, and applicatioTop Layer are rendered as siblings', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('an alert, blocking, and applicatioTop Layer are rendered as siblings', () => {
9
9
  cy.visitStory('Layer', 'Inequal Siblings');
10
10
  });
11
- (0, _steps.Given)('a blocking layer is rendered as the child of an alert layer', () => {
11
+ (0, _cypressCucumberPreprocessor.Given)('a blocking layer is rendered as the child of an alert layer', () => {
12
12
  cy.visitStory('Layer', 'Nested Lower Levels');
13
13
  });
14
- (0, _steps.Given)('an alert layer is rendered as the child of a blocking layer', () => {
14
+ (0, _cypressCucumberPreprocessor.Given)('an alert layer is rendered as the child of a blocking layer', () => {
15
15
  cy.visitStory('Layer', 'Nested Higher Levels');
16
16
  });
17
- (0, _steps.Given)('a layer with level 1001 is a sibling of 3 nested layers with level 1000', () => {
17
+ (0, _cypressCucumberPreprocessor.Given)('a layer with level 1001 is a sibling of 3 nested layers with level 1000', () => {
18
18
  cy.visitStory('Layer', 'Levels Are Respected When Nesting');
19
19
  });
20
- (0, _steps.Given)('an applicatioTop layer with a nested alert layer with a blocking sibling', () => {
20
+ (0, _cypressCucumberPreprocessor.Given)('an applicatioTop layer with a nested alert layer with a blocking sibling', () => {
21
21
  cy.visitStory('Layer', 'Nested Higher Level Ends On Top');
22
22
  });
23
- (0, _steps.Then)('the second layer is on top of the first layer', () => {
23
+ (0, _cypressCucumberPreprocessor.Then)('the second layer is on top of the first layer', () => {
24
24
  cy.get('body').click();
25
25
  cy.window().should(win => {
26
26
  expect(win.onLayerClick).to.be.calledOnce;
27
27
  expect(win.onLayerClick).to.be.calledWith('second');
28
28
  });
29
29
  });
30
- (0, _steps.Then)('the alert layer is on top', () => {
30
+ (0, _cypressCucumberPreprocessor.Then)('the alert layer is on top', () => {
31
31
  cy.get('body').click();
32
32
  cy.window().should(win => {
33
33
  expect(win.onLayerClick).to.be.calledOnce;
34
34
  expect(win.onLayerClick).to.be.calledWith('alert');
35
35
  });
36
36
  });
37
- (0, _steps.Then)('the layer with level 1001 is on top', () => {
37
+ (0, _cypressCucumberPreprocessor.Then)('the layer with level 1001 is on top', () => {
38
38
  cy.get('body').click();
39
39
  cy.window().should(win => {
40
40
  expect(win.onLayerClick).to.be.calledOnce;
41
41
  expect(win.onLayerClick).to.be.calledWith('1001');
42
42
  });
43
43
  });
44
- (0, _steps.Then)('the blocking layer is on top', () => {
44
+ (0, _cypressCucumberPreprocessor.Then)('the blocking layer is on top', () => {
45
45
  cy.get('body').click();
46
46
  cy.window().should(win => {
47
47
  expect(win.onLayerClick).to.be.calledOnce;
48
48
  expect(win.onLayerClick).to.be.calledWith('blocking');
49
49
  });
50
50
  });
51
- (0, _steps.Then)('the blocking layer is a child of the alert layer', () => {
51
+ (0, _cypressCucumberPreprocessor.Then)('the blocking layer is a child of the alert layer', () => {
52
52
  cy.get('[data-test="blocking"]').parent().should('have.data', 'test', 'alert');
53
53
  });
54
- (0, _steps.Then)('the alert layer is a sibling of the blocking layer', () => {
54
+ (0, _cypressCucumberPreprocessor.Then)('the alert layer is a sibling of the blocking layer', () => {
55
55
  cy.get('[data-test="blocking"]').next().should('have.data', 'test', 'alert');
56
56
  });
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a Layer with children is rendered', () => {
3
3
  cy.visitStory('Layer', 'Default');
4
4
  });
@@ -1,4 +1,4 @@
1
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a Layer with a button below it is rendered', () => {
3
3
  cy.visitStory('Layer', 'Blocking');
4
4
  });
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('two equal sibling Layers are rendered', () => {
3
3
  cy.visitStory('Layer', 'Equal Siblings');
4
4
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/layer",
3
- "version": "9.4.3",
3
+ "version": "9.4.5",
4
4
  "description": "UI Layer",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/portal": "9.4.3",
37
- "@dhis2/ui-constants": "9.4.3",
36
+ "@dhis2-ui/portal": "9.4.5",
37
+ "@dhis2/ui-constants": "9.4.5",
38
38
  "classnames": "^2.3.1",
39
39
  "prop-types": "^15.7.2"
40
40
  },