Skip to content

Commit

Permalink
Merge pull request #1497 from blockchain/new-data-e2e-tags
Browse files Browse the repository at this point in the history
new data-e2e tags for Security Center tab
  • Loading branch information
plondon committed Mar 2, 2019
2 parents 4bd9fb4 + b656c1c commit 291b25b
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,17 @@ const PasswordStretching = props => {
</SettingSummary>
<SettingComponent>
<SettingWrapper>
{currentStretch && <CurrentText>{currentStretch}</CurrentText>}
{currentStretch && (
<CurrentText data-e2e='currentStretchLabel'>
{currentStretch}
</CurrentText>
)}
{!updateToggled && (
<Button nature='primary' onClick={handleToggle}>
<Button
nature='primary'
onClick={handleToggle}
data-e2e='editPasswordStretchingButton'
>
<FormattedMessage
id='scenes.securitycenter.advanced.passwordstretching.edit'
defaultMessage='Edit'
Expand All @@ -73,7 +81,12 @@ const PasswordStretching = props => {
validate={validPasswordStretchingNumber}
/>
<ButtonWrapper>
<Button nature='empty' capitalize onClick={handleToggle}>
<Button
nature='empty'
capitalize
onClick={handleToggle}
data-e2e='passwordStretchCancelButton'
>
<FormattedMessage
id='scenes.securitycenter.advanced.passwordstretching.cancel'
defaultMessage='Cancel'
Expand All @@ -84,6 +97,7 @@ const PasswordStretching = props => {
nature='primary'
capitalize
disabled={submitting || invalid}
data-e2e='cancelStretchSaveButton'
>
<FormattedMessage
id='scenes.securitycenter.advanced.passwordstretching.save'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ const Settings = props => {
return (
<SettingWrapper>
{!updateToggled && (
<Button nature='primary' onClick={handleToggle}>
<Button
nature='primary'
onClick={handleToggle}
data-e2e='removeSecondPasswordButton'
>
<FormattedMessage
id='scenes.securitysettings.advanced.secondpasswordwallet.settings.remove'
defaultMessage='Remove Second Password'
Expand All @@ -81,9 +85,15 @@ const Settings = props => {
name='secondPassword'
component={PasswordBox}
validate={[required, validateSecondPassword]}
data-e2e='secondPasswordInput'
/>
<ButtonWrapper>
<Button nature='empty' capitalize onClick={handleCancel}>
<Button
nature='empty'
capitalize
onClick={handleCancel}
data-e2e='removeSecondPasswordCancelButton'
>
<FormattedMessage
id='scenes.securitysettings.advanced.secondpasswordwallet.settings.cancel'
defaultMessage='Cancel'
Expand All @@ -94,6 +104,7 @@ const Settings = props => {
nature='primary'
capitalize
disabled={submitting || invalid}
data-e2e='removeSecondPasswordConfirmationButton'
>
<FormattedMessage
id='scenes.securitysettings.advanced.secondpasswordwallet.settings.remove'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const SecondPasswordWallet = props => {
id='scenes.security.advanced.secondpassword.title'
defaultMessage='Second Password'
/>
<SettingStatus active={secondPasswordEnabled}>
<SettingStatus
active={secondPasswordEnabled}
data-e2e={`${secondPasswordEnabled}SecondPassword`}
>
{secondPasswordEnabled ? (
<FormattedMessage
id='scenes.security.advanced.secondpassword.enabled'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ const Settings = props => {
return (
<SettingWrapper>
{!updateToggled && (
<Button nature='primary' onClick={handleToggle}>
<Button
nature='primary'
onClick={handleToggle}
data-e2e='changeCurrentPassword'
>
<FormattedMessage
id='scenes.securitysettings.advanced.walletpassword.settings.change'
defaultMessage='Change'
Expand All @@ -72,6 +76,7 @@ const Settings = props => {
name='currentPassword'
component={PasswordBox}
validate={[validCurrentPassword]}
data-e2e='currentPasswordInput'
/>
</FormItemSpaced>
<FormItemSpaced style={{ marginTop: '12px' }}>
Expand All @@ -87,6 +92,7 @@ const Settings = props => {
component={PasswordBox}
validate={[validStrongPassword, isNotCurrentPassword]}
score
data-e2e='newPasswordInput'
/>
</FormItemSpaced>
<FormItemSpaced style={{ marginTop: '12px' }}>
Expand All @@ -101,11 +107,17 @@ const Settings = props => {
name='walletPasswordConfirmation'
validate={[required, validatePasswordConfirmation]}
component={PasswordBox}
data-e2e='confirmPasswordInput'
/>
</FormItemSpaced>
</FormGroup>
<ButtonWrapper>
<Button nature='empty' capitalize onClick={handleCancel}>
<Button
nature='empty'
capitalize
onClick={handleCancel}
data-e2e='cancelPasswordChangeButton'
>
<FormattedMessage
id='scenes.securitysettings.advanced.walletpassword.settings.cancel'
defaultMessage='Cancel'
Expand All @@ -116,6 +128,7 @@ const Settings = props => {
nature='primary'
capitalize
disabled={submitting || invalid}
data-e2e='confirmPasswordChangeButton'
>
<FormattedMessage
id='scenes.securitysettings.advanced.walletpassword.settings.save'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ class MenuContainer extends React.PureComponent {
return (
<Wrapper>
<TabMenu>
<LinkContainer to='/security-center/basic' activeClassName='active'>
<LinkContainer
to='/security-center/basic'
activeClassName='active'
data-e2e='securityCenterBasicLink'
>
<LinkItem>
<FormattedMessage
id='scenes.securitycenter.menu.basic'
Expand All @@ -41,6 +45,7 @@ class MenuContainer extends React.PureComponent {
<LinkContainer
to='/security-center/advanced'
activeClassName='active'
data-e2e='securityCenterAdvancedLink'
>
<LinkItem>
<FormattedMessage
Expand Down

0 comments on commit 291b25b

Please sign in to comment.