Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Add e2e test that delegate data is delegateRegistration
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Aug 30, 2017
1 parent eaa1676 commit 9ad8b67
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions features/menu.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Feature: Top right menu
And I fill in "test" to "username" field
And I click "register button"
Then I should see alert dialog with title "Success" and text "Delegate registration was successfully submitted. It can take several seconds before it is processed."
And I click "ok button"
And I wait 15 seconds
And I should see text "test" in "delegate name" element

Scenario: should not allow to register a delegate again
Given I'm logged in as "delegate"
Expand Down
4 changes: 4 additions & 0 deletions features/step_definitions/generic.step.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ defineSupportCode(({ Given, When, Then, setDefaultTimeout }) => {
waitForElemAndSendKeys(`${selectorClass} input, ${selectorClass} textarea`, secondPassphrase, callback);
});

When('I wait {seconds} seconds', (seconds, callback) => {
browser.sleep(seconds * 1000).then(callback);
});


Then('I should see "{value}" in "{fieldName}" field', (value, fieldName, callback) => {
const elem = element(by.css(`.${fieldName.replace(/ /g, '-')} input, .${fieldName.replace(/ /g, '-')} textarea`));
Expand Down
2 changes: 1 addition & 1 deletion src/components/account/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Address = (props) => {
const title = props.isDelegate ? 'Delegate' : 'Address';
const content = props.isDelegate ?
(<div>
<p className="inner primary">
<p className="inner primary delegate-name">
{props.delegate.username}
</p>
<p className="inner secondary address">
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Alert = props => (
<br />
<section className={`${grid.row} ${grid['between-xs']}`}>
<span />
<Button label='Ok' onClick={props.closeDialog}/>
<Button label='Ok' onClick={props.closeDialog} className='ok-button'/>
</section>
</div>
);
Expand Down

0 comments on commit 9ad8b67

Please sign in to comment.