Skip to content

Commit

Permalink
Merge pull request #9678 from ToolJet/test/workspace-constants-data-cy
Browse files Browse the repository at this point in the history
Added data-cy for workspace constants components
  • Loading branch information
AnantshreeChandola committed May 10, 2024
2 parents 48e92d7 + fb5ca9b commit 03859c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/src/ManageOrgConstants/ConstantForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const ConstantForm = ({
<div className="col tj-app-input">
<label className="form-label" data-cy="value-label">
Value
<small className="text-green" style={{ marginLeft: '380px' }}>
<small className="text-green" style={{ marginLeft: '380px' }} data-cy="encrypted-label">
<img className="mx-2 encrypted-icon" src="assets/images/icons/padlock.svg" width="12" height="12" />
Encrypted
</small>
Expand Down Expand Up @@ -265,6 +265,7 @@ const ConstantForm = ({
? '#384151'
: '#D1D5DB'
}
data-cy="test"
/>
)}
</div>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/ManageOrgConstants/ConstantTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ const ConstantTable = ({
style={{ display: 'flex', justifyContent: 'space-between', gap: 5 }}
data-cy={`${constant.name.toLowerCase().replace(/\s+/g, '-')}-workspace-constant-update`}
>
<div onClick={() => toggleShowValue(constant.id)} data-cy="show-password-icon">
<div
onClick={() => toggleShowValue(constant.id)}
data-cy={`${constant.name.toLowerCase().replace(/\s+/g, '-')}-constant-visibility`}
>
{!showValues[constant.id] ? (
<EyeHide
fill={
Expand Down

0 comments on commit 03859c2

Please sign in to comment.