@dhis2-ui/button 9.4.4 → 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.
Files changed (39) hide show
  1. package/build/cjs/button/features/can_be_blurred/index.js +4 -4
  2. package/build/cjs/button/features/can_be_clicked/index.js +4 -4
  3. package/build/cjs/button/features/can_be_focused/index.js +4 -4
  4. package/build/cjs/button-strip/features/accepts_children/index.js +3 -3
  5. package/build/cjs/dropdown-button/features/accepts_children/index.js +3 -3
  6. package/build/cjs/dropdown-button/features/accepts_component/index.js +3 -3
  7. package/build/cjs/dropdown-button/features/accepts_icon/index.js +3 -3
  8. package/build/cjs/dropdown-button/features/accepts_initial_focus/index.js +3 -3
  9. package/build/cjs/dropdown-button/features/button_is_clickable/index.js +3 -5
  10. package/build/cjs/dropdown-button/features/can_be_disabled/index.js +3 -8
  11. package/build/cjs/dropdown-button/features/common/index.js +2 -2
  12. package/build/cjs/dropdown-button/features/opens_a_dropdown/index.js +6 -8
  13. package/build/cjs/split-button/features/accepts_children/index.js +3 -3
  14. package/build/cjs/split-button/features/accepts_icon/index.js +5 -5
  15. package/build/cjs/split-button/features/accepts_initial_focus/index.js +3 -3
  16. package/build/cjs/split-button/features/arrow_opens_menu/index.js +9 -11
  17. package/build/cjs/split-button/features/button_is_clickable/index.js +3 -5
  18. package/build/cjs/split-button/features/can_be_disabled/index.js +6 -6
  19. package/build/cjs/split-button/features/common/index.js +3 -3
  20. package/build/es/button/features/can_be_blurred/index.js +1 -1
  21. package/build/es/button/features/can_be_clicked/index.js +1 -1
  22. package/build/es/button/features/can_be_focused/index.js +1 -1
  23. package/build/es/button-strip/features/accepts_children/index.js +1 -1
  24. package/build/es/dropdown-button/features/accepts_children/index.js +1 -1
  25. package/build/es/dropdown-button/features/accepts_component/index.js +1 -1
  26. package/build/es/dropdown-button/features/accepts_icon/index.js +1 -1
  27. package/build/es/dropdown-button/features/accepts_initial_focus/index.js +1 -1
  28. package/build/es/dropdown-button/features/button_is_clickable/index.js +1 -2
  29. package/build/es/dropdown-button/features/can_be_disabled/index.js +1 -6
  30. package/build/es/dropdown-button/features/common/index.js +1 -1
  31. package/build/es/dropdown-button/features/opens_a_dropdown/index.js +1 -2
  32. package/build/es/split-button/features/accepts_children/index.js +1 -1
  33. package/build/es/split-button/features/accepts_icon/index.js +3 -3
  34. package/build/es/split-button/features/accepts_initial_focus/index.js +1 -1
  35. package/build/es/split-button/features/arrow_opens_menu/index.js +1 -2
  36. package/build/es/split-button/features/button_is_clickable/index.js +1 -2
  37. package/build/es/split-button/features/can_be_disabled/index.js +1 -1
  38. package/build/es/split-button/features/common/index.js +1 -1
  39. package/package.json +6 -6
@@ -1,15 +1,15 @@
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)('an Button with initialFocus and onBlur handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('an Button with initialFocus and onBlur handler is rendered', () => {
6
6
  cy.visitStory('Button', 'With initialFocus and onBlur');
7
7
  cy.focused().should('exist');
8
8
  });
9
- (0, _steps.When)('the Button is blurred', () => {
9
+ (0, _cypressCucumberPreprocessor.When)('the Button is blurred', () => {
10
10
  cy.get('[data-test="dhis2-uicore-button"]').blur();
11
11
  });
12
- (0, _steps.Then)('the onBlur handler is called', () => {
12
+ (0, _cypressCucumberPreprocessor.Then)('the onBlur handler is called', () => {
13
13
  cy.window().should(win => {
14
14
  expect(win.onBlur).to.be.calledWith({
15
15
  value: 'default',
@@ -1,14 +1,14 @@
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 Button with onClick handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Button with onClick handler is rendered', () => {
6
6
  cy.visitStory('Button', 'With onClick');
7
7
  });
8
- (0, _steps.When)('the Button is clicked', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the Button is clicked', () => {
9
9
  cy.get('[data-test="dhis2-uicore-button"]').click();
10
10
  });
11
- (0, _steps.Then)('the onClick handler is called', () => {
11
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is called', () => {
12
12
  cy.window().should(win => {
13
13
  expect(win.onClick).to.be.calledWith({
14
14
  name: 'Button',
@@ -1,14 +1,14 @@
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 Button with onFocus handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Button with onFocus handler is rendered', () => {
6
6
  cy.visitStory('Button', 'With onFocus');
7
7
  });
8
- (0, _steps.When)('the Button is focused', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the Button is focused', () => {
9
9
  cy.get('[data-test="dhis2-uicore-button"]').focus();
10
10
  });
11
- (0, _steps.Then)('the onFocus handler is called', () => {
11
+ (0, _cypressCucumberPreprocessor.Then)('the onFocus handler is called', () => {
12
12
  cy.window().should(win => {
13
13
  expect(win.onFocus).to.be.calledWith({
14
14
  value: 'default',
@@ -1,11 +1,11 @@
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 ButtonStrip with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a ButtonStrip with children is rendered', () => {
6
6
  cy.visitStory('ButtonStrip', 'With children');
7
7
  cy.get('[data-test="dhis2-uicore-buttonstrip"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the children are visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
10
10
  cy.contains('I am a child').should('be.visible');
11
11
  });
@@ -1,11 +1,11 @@
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 DropdownButton with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with children is rendered', () => {
6
6
  cy.visitStory('DropdownButton', 'With children');
7
7
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the children are visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
10
10
  cy.contains('I am a child').should('be.visible');
11
11
  });
@@ -1,13 +1,13 @@
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 DropdownButton with a component prop and opened dropdown is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with a component prop and opened dropdown is rendered', () => {
6
6
  cy.visitStory('DropdownButton', 'With component');
7
7
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
8
8
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').click();
9
9
  cy.get('[data-test="dhis2-uicore-dropdownbutton-popper"]').should('exist');
10
10
  });
11
- (0, _steps.Then)('the component is visible', () => {
11
+ (0, _cypressCucumberPreprocessor.Then)('the component is visible', () => {
12
12
  cy.contains('I am a component').should('be.visible');
13
13
  });
@@ -1,11 +1,11 @@
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 DropdownButton with an icon prop is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with an icon prop is rendered', () => {
6
6
  cy.visitStory('DropdownButton', 'With icon');
7
7
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the icon is visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the icon is visible', () => {
10
10
  cy.contains('Icon').should('be.visible');
11
11
  });
@@ -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 DropdownButton with initialFocus is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with initialFocus is rendered', () => {
6
6
  cy.visitStory('DropdownButton', 'With initialFocus');
7
7
  });
8
- (0, _steps.Then)('the DropdownButton is focused', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the DropdownButton is focused', () => {
9
9
  cy.focused().parent('[data-test="dhis2-uicore-dropdownbutton"]').should('exist');
10
10
  });
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('a DropdownButton with onClick handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with onClick handler is rendered', () => {
8
6
  cy.visitStory('DropdownButton', 'With onClick');
9
7
  });
10
- (0, _steps.Then)('the onClick handler is called', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is called', () => {
11
9
  cy.window().should(win => {
12
10
  expect(win.onClick).to.be.calledWith({
13
11
  name: 'Button',
@@ -1,16 +1,11 @@
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 disabled DropdownButton with onClick handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a disabled DropdownButton with onClick handler is rendered', () => {
6
6
  cy.visitStory('DropdownButton', 'Disabled with onClick');
7
7
  });
8
- (0, _steps.When)('the DropdownButton is clicked', () => {
9
- cy.get('[data-test="dhis2-uicore-dropdownbutton"] button').click({
10
- force: true
11
- });
12
- });
13
- (0, _steps.Then)('the onClick handler is not called', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is not called', () => {
14
9
  cy.window().should(win => {
15
10
  expect(win.onClick).not.to.be.called;
16
11
  });
@@ -1,7 +1,7 @@
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.When)('the DropdownButton is clicked', () => {
5
+ (0, _cypressCucumberPreprocessor.When)('the DropdownButton is clicked', () => {
6
6
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').click();
7
7
  });
@@ -1,23 +1,21 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('a default DropdownButton is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a default DropdownButton is rendered', () => {
8
6
  cy.visitStory('DropdownButton', 'Default');
9
7
  });
10
- (0, _steps.Given)('a DropdownButton with opened dropdown is rendered', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('a DropdownButton with opened dropdown is rendered', () => {
11
9
  cy.visitStory('DropdownButton', 'Default');
12
10
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').click();
13
11
  cy.get('[data-test="dhis2-uicore-dropdownbutton-popper"]').should('exist');
14
12
  });
15
- (0, _steps.When)('the user clicks the backdrop Layer', () => {
13
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the backdrop Layer', () => {
16
14
  cy.get('[data-test="dhis2-uicore-layer"]').click();
17
15
  });
18
- (0, _steps.Then)('the dropdown is not rendered', () => {
16
+ (0, _cypressCucumberPreprocessor.Then)('the dropdown is not rendered', () => {
19
17
  cy.get('[data-test="dhis2-uicore-dropdownbutton-popper"]').should('not.exist');
20
18
  });
21
- (0, _steps.Then)('the dropdown is rendered', () => {
19
+ (0, _cypressCucumberPreprocessor.Then)('the dropdown is rendered', () => {
22
20
  cy.get('[data-test="dhis2-uicore-dropdownbutton-popper"]').should('exist');
23
21
  });
@@ -1,11 +1,11 @@
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 SplitButton with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SplitButton with children is rendered', () => {
6
6
  cy.visitStory('SplitButton', 'With children');
7
7
  cy.get('[data-test="dhis2-uicore-splitbutton"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the children are visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
10
10
  cy.get('[data-test="dhis2-uicore-splitbutton-button"]').contains('I am a child').should('be.visible');
11
11
  });
@@ -1,12 +1,12 @@
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 SplitButton with an icon is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SplitButton with an icon is rendered', () => {
6
6
  cy.visitStory('SplitButton', 'With icon');
7
7
  cy.get('[data-test="dhis2-uicore-splitbutton"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the icon is visible on the left button only', () => {
10
- cy.get('[data-test="dhis2-uicore-splitbutton-button"]').contains('Icon').should('be.visible');
11
- cy.get('[data-test="dhis2-uicore-splitbutton-toggle"]').contains('Icon').should('not.exist');
9
+ (0, _cypressCucumberPreprocessor.Then)('the icon is visible on the left button only', () => {
10
+ cy.get('[data-test="dhis2-uicore-splitbutton-button"] :contains("Icon")').should('be.visible');
11
+ cy.get('[data-test="dhis2-uicore-splitbutton-toggle"] :contains("Icon")').should('not.exist');
12
12
  });
@@ -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 SplitButton with initialFocus is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SplitButton with initialFocus is rendered', () => {
6
6
  cy.visitStory('SplitButton', 'With initialFocus');
7
7
  });
8
- (0, _steps.Then)('the SplitButton button is focused', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the SplitButton button is focused', () => {
9
9
  cy.focused().should('have.attr', 'data-test', 'dhis2-uicore-splitbutton-button');
10
10
  });
@@ -1,31 +1,29 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('a SplitButton is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SplitButton is rendered', () => {
8
6
  cy.visitStory('SplitButton', 'Default');
9
7
  });
10
- (0, _steps.Given)('the SplitButton menu is open', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('the SplitButton menu is open', () => {
11
9
  cy.get('[data-test="dhis2-uicore-splitbutton-toggle"]').click();
12
10
  cy.get('[data-test="dhis2-uicore-splitbutton-menu"]').should('be.visible');
13
11
  });
14
- (0, _steps.Given)('the SplitButton menu is closed', () => {
12
+ (0, _cypressCucumberPreprocessor.Given)('the SplitButton menu is closed', () => {
15
13
  cy.get('[data-test="dhis2-uicore-splitbutton-menu"]').should('not.exist');
16
14
  });
17
- (0, _steps.When)('the user clicks the backdrop Layer', () => {
15
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the backdrop Layer', () => {
18
16
  cy.get('[data-test="dhis2-uicore-layer"]').click();
19
17
  });
20
- (0, _steps.Then)('the menu is not visible', () => {
18
+ (0, _cypressCucumberPreprocessor.Then)('the menu is not visible', () => {
21
19
  cy.get('[data-test="dhis2-uicore-splitbutton-menu"]').should('not.exist');
22
20
  });
23
- (0, _steps.Then)('the component is not visible', () => {
21
+ (0, _cypressCucumberPreprocessor.Then)('the component is not visible', () => {
24
22
  cy.contains('Component').should('not.exist');
25
23
  });
26
- (0, _steps.Then)('the menu is visible', () => {
24
+ (0, _cypressCucumberPreprocessor.Then)('the menu is visible', () => {
27
25
  cy.get('[data-test="dhis2-uicore-splitbutton-menu"]').should('be.visible');
28
26
  });
29
- (0, _steps.Then)('the component is visible', () => {
27
+ (0, _cypressCucumberPreprocessor.Then)('the component is visible', () => {
30
28
  cy.contains('Component').should('be.visible');
31
29
  });
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('a SplitButton with onClick hander is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SplitButton with onClick hander is rendered', () => {
8
6
  cy.visitStory('SplitButton', 'With onClick');
9
7
  });
10
- (0, _steps.Then)('the onClick handler is called', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is called', () => {
11
9
  cy.window().its('onClick').should('be.calledWith', {
12
10
  name: 'Button',
13
11
  value: 'default',
@@ -1,23 +1,23 @@
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 disabled SplitButton is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a disabled SplitButton is rendered', () => {
6
6
  cy.visitStory('SplitButton', 'With disabled');
7
7
  });
8
- (0, _steps.When)('the user clicks the SplitButton Button', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the SplitButton Button', () => {
9
9
  cy.get('[data-test="dhis2-uicore-splitbutton-button"]').click({
10
10
  force: true
11
11
  });
12
12
  });
13
- (0, _steps.Then)('the SplitButton Button is not focused', () => {
13
+ (0, _cypressCucumberPreprocessor.Then)('the SplitButton Button is not focused', () => {
14
14
  cy.focused().should('not.exist');
15
15
  });
16
- (0, _steps.When)('the user clicks the SplitButton Toggle', () => {
16
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the SplitButton Toggle', () => {
17
17
  cy.get('[data-test="dhis2-uicore-splitbutton-toggle"]').click({
18
18
  force: true
19
19
  });
20
20
  });
21
- (0, _steps.Then)('the SplitButton Toggle is not focused', () => {
21
+ (0, _cypressCucumberPreprocessor.Then)('the SplitButton Toggle is not focused', () => {
22
22
  cy.focused().should('not.exist');
23
23
  });
@@ -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.When)('the SplitButton is clicked', () => {
5
+ (0, _cypressCucumberPreprocessor.When)('the SplitButton is clicked', () => {
6
6
  cy.get('[data-test="dhis2-uicore-splitbutton-button"]').click();
7
7
  });
8
- (0, _steps.When)('the SplitButton toggle is clicked', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the SplitButton toggle is clicked', () => {
9
9
  cy.get('[data-test="dhis2-uicore-splitbutton-toggle"]').click();
10
10
  });
@@ -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('an Button with initialFocus and onBlur handler is rendered', () => {
3
3
  cy.visitStory('Button', 'With initialFocus and onBlur');
4
4
  cy.focused().should('exist');
@@ -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 Button with onClick handler is rendered', () => {
3
3
  cy.visitStory('Button', 'With onClick');
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 Button with onFocus handler is rendered', () => {
3
3
  cy.visitStory('Button', 'With onFocus');
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('a ButtonStrip with children is rendered', () => {
3
3
  cy.visitStory('ButtonStrip', 'With children');
4
4
  cy.get('[data-test="dhis2-uicore-buttonstrip"]').should('be.visible');
@@ -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 DropdownButton with children is rendered', () => {
3
3
  cy.visitStory('DropdownButton', 'With children');
4
4
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
@@ -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 DropdownButton with a component prop and opened dropdown is rendered', () => {
3
3
  cy.visitStory('DropdownButton', 'With component');
4
4
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
@@ -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 DropdownButton with an icon prop is rendered', () => {
3
3
  cy.visitStory('DropdownButton', 'With icon');
4
4
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').should('be.visible');
@@ -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 DropdownButton with initialFocus is rendered', () => {
3
3
  cy.visitStory('DropdownButton', 'With initialFocus');
4
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('a DropdownButton with onClick handler is rendered', () => {
4
3
  cy.visitStory('DropdownButton', 'With onClick');
5
4
  });
@@ -1,12 +1,7 @@
1
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a disabled DropdownButton with onClick handler is rendered', () => {
3
3
  cy.visitStory('DropdownButton', 'Disabled with onClick');
4
4
  });
5
- When('the DropdownButton is clicked', () => {
6
- cy.get('[data-test="dhis2-uicore-dropdownbutton"] button').click({
7
- force: true
8
- });
9
- });
10
5
  Then('the onClick handler is not called', () => {
11
6
  cy.window().should(win => {
12
7
  expect(win.onClick).not.to.be.called;
@@ -1,4 +1,4 @@
1
- import { When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When } from '@badeball/cypress-cucumber-preprocessor';
2
2
  When('the DropdownButton is clicked', () => {
3
3
  cy.get('[data-test="dhis2-uicore-dropdownbutton"]').click();
4
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('a default DropdownButton is rendered', () => {
4
3
  cy.visitStory('DropdownButton', 'Default');
5
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('a SplitButton with children is rendered', () => {
3
3
  cy.visitStory('SplitButton', 'With children');
4
4
  cy.get('[data-test="dhis2-uicore-splitbutton"]').should('be.visible');
@@ -1,9 +1,9 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a SplitButton with an icon is rendered', () => {
3
3
  cy.visitStory('SplitButton', 'With icon');
4
4
  cy.get('[data-test="dhis2-uicore-splitbutton"]').should('be.visible');
5
5
  });
6
6
  Then('the icon is visible on the left button only', () => {
7
- cy.get('[data-test="dhis2-uicore-splitbutton-button"]').contains('Icon').should('be.visible');
8
- cy.get('[data-test="dhis2-uicore-splitbutton-toggle"]').contains('Icon').should('not.exist');
7
+ cy.get('[data-test="dhis2-uicore-splitbutton-button"] :contains("Icon")').should('be.visible');
8
+ cy.get('[data-test="dhis2-uicore-splitbutton-toggle"] :contains("Icon")').should('not.exist');
9
9
  });
@@ -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 SplitButton with initialFocus is rendered', () => {
3
3
  cy.visitStory('SplitButton', 'With initialFocus');
4
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('a SplitButton is rendered', () => {
4
3
  cy.visitStory('SplitButton', 'Default');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('a SplitButton with onClick hander is rendered', () => {
4
3
  cy.visitStory('SplitButton', 'With onClick');
5
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 disabled SplitButton is rendered', () => {
3
3
  cy.visitStory('SplitButton', 'With disabled');
4
4
  });
@@ -1,4 +1,4 @@
1
- import { When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When } from '@badeball/cypress-cucumber-preprocessor';
2
2
  When('the SplitButton is clicked', () => {
3
3
  cy.get('[data-test="dhis2-uicore-splitbutton-button"]').click();
4
4
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/button",
3
- "version": "9.4.4",
3
+ "version": "9.4.5",
4
4
  "description": "UI Button",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/layer": "9.4.4",
37
- "@dhis2-ui/loader": "9.4.4",
38
- "@dhis2-ui/popper": "9.4.4",
39
- "@dhis2/ui-constants": "9.4.4",
40
- "@dhis2/ui-icons": "9.4.4",
36
+ "@dhis2-ui/layer": "9.4.5",
37
+ "@dhis2-ui/loader": "9.4.5",
38
+ "@dhis2-ui/popper": "9.4.5",
39
+ "@dhis2/ui-constants": "9.4.5",
40
+ "@dhis2/ui-icons": "9.4.5",
41
41
  "classnames": "^2.3.1",
42
42
  "prop-types": "^15.7.2"
43
43
  },