@dhis2-ui/text-area 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.
- package/build/cjs/text-area/features/accepts_initial_focus/index.js +3 -3
- package/build/cjs/text-area/features/can_be_blurred/index.js +4 -4
- package/build/cjs/text-area/features/can_be_changed/index.js +4 -6
- package/build/cjs/text-area/features/can_be_disabled/index.js +4 -4
- package/build/cjs/text-area/features/can_be_focused/index.js +4 -6
- package/build/cjs/text-area/features/common/index.js +2 -2
- package/build/cjs/text-area-field/features/can_be_required/index.js +3 -3
- package/build/es/text-area/features/accepts_initial_focus/index.js +1 -1
- package/build/es/text-area/features/can_be_blurred/index.js +1 -1
- package/build/es/text-area/features/can_be_changed/index.js +1 -2
- package/build/es/text-area/features/can_be_disabled/index.js +1 -1
- package/build/es/text-area/features/can_be_focused/index.js +1 -2
- package/build/es/text-area/features/common/index.js +1 -1
- package/build/es/text-area-field/features/can_be_required/index.js +1 -1
- package/package.json +7 -7
|
@@ -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 TextArea with initialFocus is rendered', () => {
|
|
6
6
|
cy.visitStory('TextArea', 'With initialFocus');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Then)('the TextArea is focused', () => {
|
|
9
9
|
cy.focused().parent('[data-test="dhis2-uicore-textarea"]').should('exist');
|
|
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 TextArea with initialFocus and onBlur handler is rendered', () => {
|
|
6
6
|
cy.visitStory('TextArea', 'With initialFocus and onBlur');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the TextArea is blurred', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-textarea"] textarea').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: '',
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, _steps.Given)('a TextArea with onChange handler is rendered', () => {
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a TextArea with onChange handler is rendered', () => {
|
|
8
6
|
cy.visitStory('TextArea', 'With onChange');
|
|
9
7
|
});
|
|
10
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the TextArea is filled with a character', () => {
|
|
11
9
|
cy.get('[data-test="dhis2-uicore-textarea"]').click().type('a');
|
|
12
10
|
});
|
|
13
|
-
(0,
|
|
11
|
+
(0, _cypressCucumberPreprocessor.Then)('the onChange handler is called', () => {
|
|
14
12
|
cy.window().should(win => {
|
|
15
13
|
expect(win.onChange).to.be.calledWith({
|
|
16
14
|
value: 'a',
|
|
@@ -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 TextArea is rendered', () => {
|
|
6
6
|
cy.visitStory('TextArea', 'With disabled');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks the TextArea', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uicore-textarea"] textarea').click({
|
|
10
10
|
force: true
|
|
11
11
|
});
|
|
12
12
|
});
|
|
13
|
-
(0,
|
|
13
|
+
(0, _cypressCucumberPreprocessor.Then)('the TextArea is not focused', () => {
|
|
14
14
|
cy.focused().should('not.exist');
|
|
15
15
|
});
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, _steps.Given)('a TextArea with onFocus handler is rendered', () => {
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('a TextArea with onFocus handler is rendered', () => {
|
|
8
6
|
cy.visitStory('TextArea', 'With onFocus');
|
|
9
7
|
});
|
|
10
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the TextArea is focused', () => {
|
|
11
9
|
cy.get('[data-test="dhis2-uicore-textarea"] textarea').focus();
|
|
12
10
|
});
|
|
13
|
-
(0,
|
|
11
|
+
(0, _cypressCucumberPreprocessor.Then)('the onFocus handler is called', () => {
|
|
14
12
|
cy.window().should(win => {
|
|
15
13
|
expect(win.onFocus).to.be.calledWith({
|
|
16
14
|
value: '',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('an empty TextArea is rendered', () => {
|
|
6
6
|
cy.visitStory('TextArea', 'Empty');
|
|
7
7
|
});
|
|
@@ -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 TextAreaField with label and a required flag is rendered', () => {
|
|
6
6
|
cy.visitStory('TextAreaField', 'With label and required');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Then)('the required indicator is visible', () => {
|
|
9
9
|
cy.get('[data-test="dhis2-uiwidgets-textareafield-label-required"]').should('be.visible');
|
|
10
10
|
});
|
|
@@ -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 TextArea with initialFocus and onBlur handler is rendered', () => {
|
|
3
3
|
cy.visitStory('TextArea', 'With initialFocus and onBlur');
|
|
4
4
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
|
|
1
|
+
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
|
|
3
2
|
Given('a TextArea with onChange handler is rendered', () => {
|
|
4
3
|
cy.visitStory('TextArea', 'With onChange');
|
|
5
4
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
|
|
1
|
+
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
|
|
3
2
|
Given('a TextArea with onFocus handler is rendered', () => {
|
|
4
3
|
cy.visitStory('TextArea', 'With onFocus');
|
|
5
4
|
});
|
|
@@ -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 TextAreaField with label and a required flag is rendered', () => {
|
|
3
3
|
cy.visitStory('TextAreaField', 'With label and required');
|
|
4
4
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/text-area",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"description": "UI TextArea",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2-ui/box": "9.
|
|
37
|
-
"@dhis2-ui/field": "9.
|
|
38
|
-
"@dhis2-ui/loader": "9.
|
|
39
|
-
"@dhis2-ui/status-icon": "9.
|
|
40
|
-
"@dhis2/ui-constants": "9.
|
|
41
|
-
"@dhis2/ui-icons": "9.
|
|
36
|
+
"@dhis2-ui/box": "9.6.0",
|
|
37
|
+
"@dhis2-ui/field": "9.6.0",
|
|
38
|
+
"@dhis2-ui/loader": "9.6.0",
|
|
39
|
+
"@dhis2-ui/status-icon": "9.6.0",
|
|
40
|
+
"@dhis2/ui-constants": "9.6.0",
|
|
41
|
+
"@dhis2/ui-icons": "9.6.0",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"prop-types": "^15.7.2"
|
|
44
44
|
},
|