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

Commit

Permalink
Merge pull request #629 from LiskHQ/615-stabilize-selected-network-e2e
Browse files Browse the repository at this point in the history
Stabilize e2e Scenario: should remember the selected network - Closes #615
  • Loading branch information
slaweet authored Aug 22, 2017
2 parents 97ca7c1 + 134d108 commit 71656da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions features/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ Feature: Login page
Then I should be logged in
And I should see text "Testnet" in "peer network" element

@ignore
Scenario: should remember the selected network
Given I'm on login page
When I fill in "wagon stock borrow episode laundry kitten salute link globe zero feed marble" to "passphrase" field
And I select option no. 2 from "network" select
And I click "login button"
And I click "logout button"
And I refresh the page
And I fill in "wagon stock borrow episode laundry kitten salute link globe zero feed marble" to "passphrase" field
And I click "login button"
Then I should be logged in
Expand Down
6 changes: 5 additions & 1 deletion features/step_definitions/login.step.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
const { defineSupportCode } = require('cucumber');
const { waitForElemAndCheckItsText } = require('../support/util.js');

defineSupportCode(({ Given, Then }) => {
defineSupportCode(({ Given, Then, When }) => {
Given('I\'m on login page', (callback) => {
browser.ignoreSynchronization = true;
browser.driver.manage().window().setSize(1000, 1000);
browser.driver.get('about:blank');
browser.get('http://localhost:8080/#/?peerStack=localhost').then(callback);
});

When('I refresh the page', (callback) => {
browser.driver.navigate().refresh().then(callback);
});

Then('I should be logged in', (callback) => {
waitForElemAndCheckItsText('.logout-button', 'LOGOUT', callback);
});
Expand Down

0 comments on commit 71656da

Please sign in to comment.