Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new data-e2e tags for backup funds functionality #1493

Merged
merged 1 commit into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const FirstStep = props => {
defaultMessage='We created a printable backup sheet to give you a place to write down your 12 word phrase and keep it safe. Please print the blank sheet (or grab a piece of paper) and move on to the next step.'
/>
</Text>
<Link href={recoveryPdf} download='recovery_phrase.pdf'>
<Link
href={recoveryPdf}
download='recovery_phrase.pdf'
data-e2e='downloadRecoveryPhraseLink'
>
<Button nature='empty'>
<Image
name='printer'
Expand All @@ -83,13 +87,21 @@ const FirstStep = props => {
</Link>
</PrintContainer>
<Buttons>
<Button nature='empty' onClick={props.handleClose}>
<Button
nature='empty'
onClick={props.handleClose}
data-e2e='backupFundsCancelButton'
>
<FormattedMessage
id='scenes.security.2fa.cancel'
defaultMessage='Cancel'
/>
</Button>
<Button nature='primary' onClick={nextStep}>
<Button
nature='primary'
onClick={nextStep}
data-e2e='backupFundsProceedButton'
>
<FormattedMessage
id='modals.recoveryphrase.firststep.backup'
defaultMessage='Backup Funds'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,44 @@ const SecondStep = props => {
<Wrapper>
<Container>
{words.map((word, index) => {
return <Word key={index}>{word}</Word>
return (
<Word key={index} data-e2e='backupWords'>
{word}
</Word>
)
})}
</Container>
<Buttons>
{step === 1 ? (
<Button nature='empty' onClick={props.handleClose}>
<Button
nature='empty'
onClick={props.handleClose}
data-e2e='backupPhraseCancelButton'
>
<FormattedMessage
id='scenes.security.2fa.cancel'
defaultMessage='Cancel'
/>
</Button>
) : (
<Button onClick={handleClickPrevious} nature='empty'>
<Button
onClick={handleClickPrevious}
nature='empty'
data-e2e='previous4WordsButton'
>
<FormattedMessage
id='modals.recoveryphrase.secondstep.prevfourwords'
defaultMessage='Previous 4 Words'
/>
</Button>
)}
{step === 3 ? (
<Button onClick={nextStep} style={spacing('ml-15')} nature='primary'>
<Button
onClick={nextStep}
style={spacing('ml-15')}
nature='primary'
data-e2e='finishAndVerifyButton'
>
<FormattedMessage
id='modals.recoveryphrase.secondstep.finishandcheckphrase'
defaultMessage='Finish & Verify'
Expand All @@ -81,6 +98,7 @@ const SecondStep = props => {
onClick={handleClickNext}
style={spacing('ml-15')}
nature='primary'
data-e2e='next4WordsButton'
>
<FormattedMessage
id='modals.recoveryphrase.secondstep.nextfourwords'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ const ThirdStep = props => {
<Container>
{indexes.map(index => (
<WordContainer key={index}>
<Text size='14px' weight={300} style={{ marginBottom: '4px' }}>
<Text
size='14px'
weight={300}
style={{ marginBottom: '4px' }}
data-e2e='wordLabel'
>
{`${languageHelper(index)} word`}
</Text>
<Field
Expand All @@ -83,12 +88,17 @@ const ThirdStep = props => {
validate={[required]}
errorBottom
noLastPass
data-e2e='wordInput'
/>
</WordContainer>
))}
</Container>
<Buttons>
<Button onClick={previousStep} nature='empty'>
<Button
onClick={previousStep}
nature='empty'
data-e2e='reviewBackupPhraseButton'
>
<Text weight={300} cursor='pointer'>
<FormattedMessage
id='scenes.securitycenter.walletrecoveryphrase.thirdstep.review'
Expand All @@ -101,6 +111,7 @@ const ThirdStep = props => {
nature='primary'
disabled={submitting || invalid}
style={spacing('ml-15')}
data-e2e='confirmBackupPhraseButton'
>
<FormattedMessage
id='scenes.securitycenter.walletrecoveryphrase.thirdstep.confirm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const WalletRecoveryPhrase = props => {
if (!nextStepToggled) {
if (!descriptionToggled && isMnemonicVerified) {
const againBtn = (
<BackupButton nature='primary' onClick={props.toggleNextStep}>
<BackupButton
nature='primary'
onClick={props.toggleNextStep}
data-e2e='backupFundsButton'
>
<FormattedMessage
id='scenes.securitysettings.basicsecurity.walletrecovery.settings.backupagain'
defaultMessage='Backup Again'
Expand All @@ -74,7 +78,11 @@ const WalletRecoveryPhrase = props => {
return securityComponent(againBtn)
} else if (!descriptionToggled) {
const backupBtn = (
<BackupButton nature='primary' onClick={props.toggleNextStep}>
<BackupButton
nature='primary'
onClick={props.toggleNextStep}
data-e2e='backupFundsButton'
>
<FormattedMessage
id='scenes.securitysettings.basicsecurity.walletrecovery.settings.backupfunds'
defaultMessage='Backup Funds'
Expand Down