From a89ccf505badf4c5c2b834e5a0d94ada8ca5f814 Mon Sep 17 00:00:00 2001 From: Malek Date: Tue, 31 Jul 2018 15:18:41 +0300 Subject: Add data-test-id Issue-ID: SDC-1579 Change-Id: I4cc3976f391622c529fd9f34f33f0101c4d7b5a1 Signed-off-by: Malek --- .../main/frontend/src/features/catalog/views/AddWorkflow.jsx | 5 ++++- .../src/main/frontend/src/features/catalog/views/Header.jsx | 6 +++++- .../src/main/frontend/src/features/catalog/views/Main.jsx | 1 + .../main/frontend/src/features/catalog/views/Workflows.jsx | 1 + .../src/features/version/inputOutput/InputOutputView.jsx | 9 ++++++++- .../src/features/version/inputOutput/views/DataRow.jsx | 11 ++++++++++- .../frontend/src/features/version/inputOutput/views/Tab.js | 8 ++++++-- .../src/main/frontend/src/shared/searchInput/SearchInput.jsx | 12 ++++++++++-- 8 files changed, 45 insertions(+), 8 deletions(-) (limited to 'workflow-designer-ui') diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/AddWorkflow.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/AddWorkflow.jsx index 1e39c174..74dfc32e 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/AddWorkflow.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/AddWorkflow.jsx @@ -23,7 +23,10 @@ class AddWorkflow extends React.Component { render() { const { onClick } = this.props; return ( -
+
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Header.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Header.jsx index 93dfffe8..864a512c 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Header.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Header.jsx @@ -22,7 +22,11 @@ import SearchInput from 'shared/searchInput/SearchInput'; const Header = ({ searchChange, searchValue }) => (
- +
); diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Main.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Main.jsx index 5f60ebda..b363dd84 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Main.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Main.jsx @@ -42,6 +42,7 @@ class Main extends Component {
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Workflows.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Workflows.jsx index b120929a..83c226ff 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Workflows.jsx +++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/views/Workflows.jsx @@ -23,6 +23,7 @@ const Workflows = ({ results, onWorkflowClick }) => results.map((workflow, index) => (
-
+
{types.map((type, i) => (
); @@ -68,6 +76,7 @@ DataRow.propTypes = { data: PropTypes.object, types: PropTypes.array, nameErrorMessage: PropTypes.string, + dataTestId: PropTypes.string, handleNameChange: PropTypes.func, handleNameBlur: PropTypes.func, handleTypeChange: PropTypes.func, diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/inputOutput/views/Tab.js b/workflow-designer-ui/src/main/frontend/src/features/version/inputOutput/views/Tab.js index 4b983731..ad56dc15 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/inputOutput/views/Tab.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/inputOutput/views/Tab.js @@ -18,13 +18,16 @@ import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; -const Tab = ({ children, isActive, handleTabClick }) => { +const Tab = ({ children, isActive, dataTestId, handleTabClick }) => { const className = cn('input-output__tab', { 'input-output__tab--active': isActive }); return ( -
+
{children}
); @@ -33,6 +36,7 @@ const Tab = ({ children, isActive, handleTabClick }) => { Tab.propTypes = { children: PropTypes.node, isActive: PropTypes.bool, + dataTestId: PropTypes.string, handleTabClick: PropTypes.func }; diff --git a/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx b/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx index e0046926..24dbca43 100644 --- a/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx +++ b/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx @@ -20,6 +20,7 @@ import SVGIcon from 'sdc-ui/lib/react/SVGIcon'; class ExpandableInput extends React.Component { static propTypes = { + dataTestId: PropTypes.string, onChange: PropTypes.func, value: PropTypes.string }; @@ -75,7 +76,7 @@ class ExpandableInput extends React.Component { }; render() { - let { value } = this.props; + let { value, dataTestId } = this.props; const { showInput } = this.state; @@ -85,6 +86,7 @@ class ExpandableInput extends React.Component {
@@ -100,6 +102,7 @@ class ExpandableInput extends React.Component { value={value} ref={this.handleRef} className="input-control" + data-test-id={`${dataTestId}-input-control`} onChange={this.handleChange} onKeyDown={this.handleKeyDown} onBlur={this.handleBlur} @@ -107,12 +110,17 @@ class ExpandableInput extends React.Component {
{value && ( this.handleClose()} name="close" /> )} {!value && ( - + )}
-- cgit 1.2.3-korg