@dhis2-ui/radio 9.4.4 → 9.4.6
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.
- package/build/cjs/features/accepts_initial_focus/index.js +3 -3
- package/build/cjs/features/accepts_label/index.js +3 -3
- package/build/cjs/features/can_be_blurred/index.js +4 -4
- package/build/cjs/features/can_be_changed/index.js +4 -4
- package/build/cjs/features/can_be_disabled/index.js +4 -4
- package/build/cjs/features/can_be_focused/index.js +4 -4
- package/build/es/features/accepts_initial_focus/index.js +1 -1
- package/build/es/features/accepts_label/index.js +1 -1
- package/build/es/features/can_be_blurred/index.js +1 -1
- package/build/es/features/can_be_changed/index.js +1 -1
- package/build/es/features/can_be_disabled/index.js +1 -1
- package/build/es/features/can_be_focused/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
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 Radio with initialFocus is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With initialFocus');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Then)('the Radio is focused', () => {
|
|
9
9
|
cy.focused().parent('[data-test="dhis2-uicore-radio"]').should('exist');
|
|
10
10
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
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 Radio with a label is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With label');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Then)('the label is shown', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-radio"]').contains('The label').should('be.visible');
|
|
10
10
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
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 Radio with initialFocus and onBlur handler is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With initialFocus and onBlur');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the Radio is blurred', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-radio"] input').blur();
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
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
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a Radio with onChange handler is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With onChange');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the Radio is checked', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-radio"]').click();
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
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
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a disabled Radio is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With disabled');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks the Radio', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-radio"] input').click({
|
|
10
10
|
force: true
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
(0,
|
|
13
|
+
(0, _cypressCucumberPreprocessor.Then)('the Radio is not focused', () => {
|
|
14
14
|
cy.focused().should('not.exist');
|
|
15
15
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
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 Radio with onFocus handler is rendered', () => {
|
|
6
6
|
cy.visitStory('Radio', 'With onFocus');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the Radio is focused', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-radio"] input').focus();
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { Given, When, Then } from 'cypress-cucumber-preprocessor
|
|
1
|
+
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
|
|
2
2
|
Given('a Radio with initialFocus and onBlur handler is rendered', () => {
|
|
3
3
|
cy.visitStory('Radio', 'With initialFocus and onBlur');
|
|
4
4
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/radio",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.6",
|
|
4
4
|
"description": "UI Radio",
|
|
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.6",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|