@redhat-cloud-services/frontend-components 3.9.6 → 3.9.7
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.
|
@@ -81,7 +81,7 @@ var ConditionalFilter = function (_a) {
|
|
|
81
81
|
!shouldRenderNewLayout && (react_1.default.createElement(react_1.Fragment, null, !items || (items && items.length <= 0) ? (react_1.default.createElement("div", { className: (0, classnames_1.default)('ins-c-conditional-filter', {
|
|
82
82
|
desktop: useMobileLayout,
|
|
83
83
|
}) },
|
|
84
|
-
react_1.default.createElement(TextFilter_1.default, { id: id, isDisabled: isDisabled, onChange: function (e) { return onChangeCallback(e,
|
|
84
|
+
react_1.default.createElement(TextFilter_1.default, { id: id, isDisabled: isDisabled, onChange: function (e) { return onChangeCallback(e, e.target.value); }, placeholder: placeholder, value: currentValue ? String(currentValue) : undefined, "widget-type": "InsightsInput" }))) : (react_1.default.createElement(react_core_1.Split, { className: (0, classnames_1.default)('ins-c-conditional-filter', {
|
|
85
85
|
desktop: useMobileLayout,
|
|
86
86
|
}) },
|
|
87
87
|
items.length > 1 && (react_1.default.createElement(react_core_1.SplitItem, null,
|
|
@@ -13,12 +13,19 @@ describe('DownloadButton component', function () {
|
|
|
13
13
|
it('renders the dropdown', function () {
|
|
14
14
|
cy.get('.pf-c-dropdown');
|
|
15
15
|
});
|
|
16
|
-
it('on download callback fired', function () {
|
|
16
|
+
it('on download CSV callback fired', function () {
|
|
17
17
|
var onSelectSpy = cy.spy().as('onSelectSpy');
|
|
18
18
|
(0, react_2.mount)(react_1.default.createElement(__1.DownloadButton, { onSelect: onSelectSpy }));
|
|
19
19
|
cy.get('div[data-ouia-component-id="Export"] > button').click();
|
|
20
20
|
cy.get('div[data-ouia-component-id="Export"] > ul > li > button[data-ouia-component-id="DownloadCSV"]').click();
|
|
21
21
|
cy.get('@onSelectSpy').should('have.been.called.with', 'csv');
|
|
22
22
|
});
|
|
23
|
+
it('on download JSON callback fired', function () {
|
|
24
|
+
var onSelectSpy = cy.spy().as('onSelectSpy');
|
|
25
|
+
(0, react_2.mount)(react_1.default.createElement(__1.DownloadButton, { onSelect: onSelectSpy }));
|
|
26
|
+
cy.get('div[data-ouia-component-id="Export"] > button').click();
|
|
27
|
+
cy.get('div[data-ouia-component-id="Export"] > ul > li > button[data-ouia-component-id="DownloadJSON"]').click();
|
|
28
|
+
cy.get('@onSelectSpy').should('have.been.called.with', 'json');
|
|
29
|
+
});
|
|
23
30
|
});
|
|
24
31
|
//# sourceMappingURL=DownloadButton.spec.ct.js.map
|
|
@@ -57,7 +57,7 @@ var ConditionalFilter = function (_a) {
|
|
|
57
57
|
!shouldRenderNewLayout && (React.createElement(Fragment, null, !items || (items && items.length <= 0) ? (React.createElement("div", { className: classNames('ins-c-conditional-filter', {
|
|
58
58
|
desktop: useMobileLayout,
|
|
59
59
|
}) },
|
|
60
|
-
React.createElement(TextFilter, { id: id, isDisabled: isDisabled, onChange: function (e) { return onChangeCallback(e,
|
|
60
|
+
React.createElement(TextFilter, { id: id, isDisabled: isDisabled, onChange: function (e) { return onChangeCallback(e, e.target.value); }, placeholder: placeholder, value: currentValue ? String(currentValue) : undefined, "widget-type": "InsightsInput" }))) : (React.createElement(Split, { className: classNames('ins-c-conditional-filter', {
|
|
61
61
|
desktop: useMobileLayout,
|
|
62
62
|
}) },
|
|
63
63
|
items.length > 1 && (React.createElement(SplitItem, null,
|
|
@@ -8,12 +8,19 @@ describe('DownloadButton component', function () {
|
|
|
8
8
|
it('renders the dropdown', function () {
|
|
9
9
|
cy.get('.pf-c-dropdown');
|
|
10
10
|
});
|
|
11
|
-
it('on download callback fired', function () {
|
|
11
|
+
it('on download CSV callback fired', function () {
|
|
12
12
|
var onSelectSpy = cy.spy().as('onSelectSpy');
|
|
13
13
|
mount(React.createElement(DownloadButton, { onSelect: onSelectSpy }));
|
|
14
14
|
cy.get('div[data-ouia-component-id="Export"] > button').click();
|
|
15
15
|
cy.get('div[data-ouia-component-id="Export"] > ul > li > button[data-ouia-component-id="DownloadCSV"]').click();
|
|
16
16
|
cy.get('@onSelectSpy').should('have.been.called.with', 'csv');
|
|
17
17
|
});
|
|
18
|
+
it('on download JSON callback fired', function () {
|
|
19
|
+
var onSelectSpy = cy.spy().as('onSelectSpy');
|
|
20
|
+
mount(React.createElement(DownloadButton, { onSelect: onSelectSpy }));
|
|
21
|
+
cy.get('div[data-ouia-component-id="Export"] > button').click();
|
|
22
|
+
cy.get('div[data-ouia-component-id="Export"] > ul > li > button[data-ouia-component-id="DownloadJSON"]').click();
|
|
23
|
+
cy.get('@onSelectSpy').should('have.been.called.with', 'json');
|
|
24
|
+
});
|
|
18
25
|
});
|
|
19
26
|
//# sourceMappingURL=DownloadButton.spec.ct.js.map
|