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

Fix flaky new account e2e test - Closes #135 #139

Merged
merged 1 commit into from
Dec 21, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/passphrase/confirm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class Confirm extends React.Component {
<PrimaryButton
theme={styles}
label={this.props.t('Get to your Dashboard')}
className="next-button"
className="get-to-your-dashboard-button"
onClick={() => this.props.finalCallback({ passphrase: words.join(' ') })}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/passphrase/confirm/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Passphrase: Confirm', () => {
});
wrapper.update();

const wrapperProps = wrapper.find('button.next-button').props();
const wrapperProps = wrapper.find('button.get-to-your-dashboard-button').props();
expect(wrapperProps.disabled).to.be.equal(true);
});

Expand All @@ -83,7 +83,7 @@ describe('Passphrase: Confirm', () => {
});
wrapper.update();

const wrapperProps = wrapper.find('button.next-button').props();
const wrapperProps = wrapper.find('button.get-to-your-dashboard-button').props();
expect(wrapperProps.disabled).to.not.be.equal(true);
});
});
2 changes: 1 addition & 1 deletion src/components/passphrase/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Create extends React.Component {
<PrimaryButton
theme={styles}
label='Get passphrase'
className="next-button"
className="get-passphrase-button"
onClick={() => nextStep({ passphrase: this.state.passphrase })}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/passphrase/safekeeping/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PassphraseShow extends React.Component {
}}
primaryButton={{
label: t('Yes! It\'s safe'),
className: 'next-button',
className: 'yes-its-safe-button',
onClick: () => nextStep({ passphrase }),
}} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/passphrase/safekeeping/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('Passphrase: Safekeeping', () => {
});

it('should call nextStep if Next button clicked', () => {
wrapper.find('button.next-button').simulate('click');
wrapper.find('button.yes-its-safe-button').simulate('click');
expect(props.nextStep).to.have.been.calledWith();
});
});
6 changes: 3 additions & 3 deletions test/e2e/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Feature: Login page
And I wait 1 seconds
And I 250 times move mouse randomly
And I wait 2 seconds
And I click "next button"
And I click "get passphrase button"
And I swipe "i understand checkbox" to right
And I swipe "reveal checkbox" to right
And I remember passphrase, click "next button", choose missing words
And I click "next button"
And I remember passphrase, click "yes its safe button", choose missing words
And I click "get to your dashboard button"
Then I should be logged in
8 changes: 5 additions & 3 deletions test/e2e/registerSecondPassphrase.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Feature: Register second passphrase
When I click "register second passphrase" in main menu
And I click "next button"
And I 250 times move mouse randomly
And I click "next button"
And I remember passphrase, click "next button", fill in missing word
And I click "next button"
And I click "get passphrase button"
And I swipe "i understand checkbox" to right
And I swipe "reveal checkbox" to right
And I remember passphrase, click "yes its safe button", choose missing words
And I click "get to your dashboard button"
Then I should see alert dialog with title "Success" and text "Second passphrase registration was successfully submitted. It can take several seconds before it is processed."

Scenario: should not allow to set 2nd passphrase again
Expand Down