@dhis2-ui/switch 9.5.0-alpha.1 → 9.6.0

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 Switch with initialFocus is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Switch with initialFocus is rendered', () => {
6
6
  cy.visitStory('Switch', 'With initialFocus');
7
7
  });
8
- (0, _steps.Then)('the Switch is focused', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the Switch is focused', () => {
9
9
  cy.focused().parent('[data-test="dhis2-uicore-switch"]').should('exist');
10
10
  });
@@ -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 Switch with a label is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Switch with a label is rendered', () => {
6
6
  cy.visitStory('Switch', 'With label');
7
7
  });
8
- (0, _steps.Then)('the label is shown', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the label is shown', () => {
9
9
  cy.get('[data-test="dhis2-uicore-switch"]').contains('The label').should('be.visible');
10
10
  });
@@ -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 Switch with initialFocus and onBlur handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Switch with initialFocus and onBlur handler is rendered', () => {
6
6
  cy.visitStory('Switch', 'With initialFocus and onBlur');
7
7
  });
8
- (0, _steps.When)('the Switch is blurred', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the Switch is blurred', () => {
9
9
  cy.get('[data-test="dhis2-uicore-switch"] input').blur();
10
10
  });
11
- (0, _steps.Then)('the onBlur handler is called', () => {
11
+ (0, _cypressCucumberPreprocessor.Then)('the onBlur handler is called', () => {
12
12
  cy.window().should(win => {
13
13
  expect(win.onBlur).to.be.calledWith({
14
14
  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 Switch with onChange handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Switch with onChange handler is rendered', () => {
6
6
  cy.visitStory('Switch', 'With onChange');
7
7
  });
8
- (0, _steps.When)('the Switch is clicked', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the Switch is clicked', () => {
9
9
  cy.get('[data-test="dhis2-uicore-switch"]').click();
10
10
  });
11
- (0, _steps.Then)('the onChange handler is called', () => {
11
+ (0, _cypressCucumberPreprocessor.Then)('the onChange handler is called', () => {
12
12
  cy.window().should(win => {
13
13
  expect(win.onChange).to.be.calledWith({
14
14
  value: 'default',
@@ -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)('a disabled Switch is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a disabled Switch is rendered', () => {
6
6
  cy.visitStory('Switch', 'With disabled');
7
7
  });
8
- (0, _steps.When)('the user clicks the Switch', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the Switch', () => {
9
9
  cy.get('[data-test="dhis2-uicore-switch"] input').click({
10
10
  force: true
11
11
  });
12
12
  });
13
- (0, _steps.Then)('the Switch is not focused', () => {
13
+ (0, _cypressCucumberPreprocessor.Then)('the Switch is not focused', () => {
14
14
  cy.focused().should('not.exist');
15
15
  });
@@ -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 Switch with onFocus handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Switch with onFocus handler is rendered', () => {
6
6
  cy.visitStory('Switch', 'With onFocus');
7
7
  });
8
- (0, _steps.When)('the Switch is focused', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the Switch is focused', () => {
9
9
  cy.get('[data-test="dhis2-uicore-switch"] input').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,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 SwitchField with label and a required flag is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a SwitchField with label and a required flag is rendered', () => {
6
6
  cy.visitStory('SwitchField', 'With label and required');
7
7
  });
8
- (0, _steps.Then)('the required indicator is visible', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the required indicator is visible', () => {
9
9
  cy.get('[data-test="dhis2-uiwidgets-switchfield-required"]').should('be.visible');
10
10
  });
@@ -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 Switch with initialFocus is rendered', () => {
3
3
  cy.visitStory('Switch', 'With initialFocus');
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 Switch with a label is rendered', () => {
3
3
  cy.visitStory('Switch', 'With label');
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 Switch with initialFocus and onBlur handler is rendered', () => {
3
3
  cy.visitStory('Switch', 'With initialFocus and onBlur');
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 Switch with onChange handler is rendered', () => {
3
3
  cy.visitStory('Switch', 'With onChange');
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 disabled Switch is rendered', () => {
3
3
  cy.visitStory('Switch', 'With disabled');
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 Switch with onFocus handler is rendered', () => {
3
3
  cy.visitStory('Switch', '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 SwitchField with label and a required flag is rendered', () => {
3
3
  cy.visitStory('SwitchField', 'With label and required');
4
4
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/switch",
3
- "version": "9.5.0-alpha.1",
3
+ "version": "9.6.0",
4
4
  "description": "UI Switch",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/field": "9.5.0-alpha.1",
37
- "@dhis2-ui/required": "9.5.0-alpha.1",
38
- "@dhis2/ui-constants": "9.5.0-alpha.1",
36
+ "@dhis2-ui/field": "9.6.0",
37
+ "@dhis2-ui/required": "9.6.0",
38
+ "@dhis2/ui-constants": "9.6.0",
39
39
  "classnames": "^2.3.1",
40
40
  "prop-types": "^15.7.2"
41
41
  },