From eadcbe1ce98fe22542c3e7cae5cde3871f3ea266 Mon Sep 17 00:00:00 2001 From: Apurva Bakshi Date: Fri, 6 Dec 2019 16:00:02 -0500 Subject: [PATCH 1/2] Add the data-Cy attribute for having better selector for tests --- .../Organization/OrganizationDetail/OrganizationDetail.jsx | 6 +++++- .../src/screens/Project/ProjectDetail/ProjectDetail.jsx | 6 +++++- awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx | 6 +++++- awx/ui_next/src/screens/User/UserDetail/UserDetail.jsx | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx index f66b95be69..c21c8cd068 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx +++ b/awx/ui_next/src/screens/Organization/OrganizationDetail/OrganizationDetail.jsx @@ -79,7 +79,11 @@ class OrganizationDetail extends Component { return ( - + - + {summary_fields.organization && ( - + - + From eddee456b33d1b8ce37c17c1ddf57107ed380ba3 Mon Sep 17 00:00:00 2001 From: Apurva Bakshi Date: Wed, 27 Nov 2019 13:24:22 -0500 Subject: [PATCH 2/2] Add dataCy attribute to select-user-role and select-team-role buttons --- awx/ui_next/src/components/AddRole/AddResourceRole.jsx | 2 ++ awx/ui_next/src/components/AddRole/SelectableCard.jsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx index 3add8286c9..596b3bbe97 100644 --- a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx +++ b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx @@ -187,11 +187,13 @@ class AddResourceRole extends React.Component { this.handleResourceSelect('users')} /> this.handleResourceSelect('teams')} /> diff --git a/awx/ui_next/src/components/AddRole/SelectableCard.jsx b/awx/ui_next/src/components/AddRole/SelectableCard.jsx index cebc795a0e..475af3d2ce 100644 --- a/awx/ui_next/src/components/AddRole/SelectableCard.jsx +++ b/awx/ui_next/src/components/AddRole/SelectableCard.jsx @@ -33,7 +33,7 @@ const Label = styled.div` class SelectableCard extends Component { render() { - const { label, onClick, isSelected } = this.props; + const { label, onClick, isSelected, dataCy } = this.props; return (