diff --git a/features/login.feature b/features/login.feature index 06f4687e9..0947f9c3e 100644 --- a/features/login.feature +++ b/features/login.feature @@ -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 diff --git a/features/step_definitions/login.step.js b/features/step_definitions/login.step.js index b1146bfc3..c646e4ad9 100644 --- a/features/step_definitions/login.step.js +++ b/features/step_definitions/login.step.js @@ -2,7 +2,7 @@ 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); @@ -10,6 +10,10 @@ defineSupportCode(({ Given, Then }) => { 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); });