Skip to content

Commit

Permalink
Write e2e tests for followed accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gina Contrino committed Jun 21, 2018
1 parent a8b5b41 commit 5d06e0e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/sendTo/send.js
Expand Up @@ -94,7 +94,7 @@ class SendTo extends React.Component {

<Button onClick={() => handleClick()}
className={`${styles.button} ${styles.follow} follow-account`} >
<FontIcon value={isFollowing ? 'star-filled' : 'star-outline'}/> <span className={styles.label}>{isFollowing ? t('Unfollow') : t('Follow')}</span>
<FontIcon value={isFollowing ? 'star-filled' : 'star-outline'}/> <span className={`${styles.label} follow-label`}>{isFollowing ? t('Unfollow') : t('Follow')}</span>
</Button>
</div>
</section>
Expand Down
8 changes: 8 additions & 0 deletions test/e2e/explorer.feature
Expand Up @@ -14,6 +14,14 @@ Feature: Explorer page
And I click "addresses result"
And I wait 2 seconds
Then I should see 25 rows
Then I should see text "Follow" in "follow label" element
When I click "follow account"
And I fill in "Bob" to "account title" field
And I click "follow account"
Then I should see text "Unfollow" in "follow label" element
Then I should see text "Bob" in "account title" element
When I click "follow account"
Then I should see text "Follow" in "follow label" element
When I click "send to address"
And I wait 1 seconds
Then I should be on url "/?referrer=/wallet%3Frecipient%3D15610359283786884938L"
Expand Down
22 changes: 22 additions & 0 deletions test/e2e/followedAccounts.feature
@@ -0,0 +1,22 @@
Feature: Followed accounts
Scenario: should add a followed account to list
Given I'm logged in as "genesis"
Then I should see 0 instances of "followed account"
And I click "add account button"
And I fill in "94495548317450502L" to "address" field
When I click "next"
And I click "next"
Then I should see 1 instances of "followed account"
And I should see "94495548317450502L" in "account title" field
When I click "edit accounts"
And I clear "account title" field
When I fill in "Bob" to "account title" field
And I click "edit accounts"
And I should see "Bob" in "account title" field
When I click "followed account"
Then I should be on url "/explorer/accounts/94495548317450502L"
And I should see text "Bob" in "account title" element
When I go to "/dashboard"
And I click "edit accounts"
When I click "remove account"
Then I should see 0 instances of "followed account"

0 comments on commit 5d06e0e

Please sign in to comment.