diff --git a/backend/spec/system/scenarios/login_flow_spec.rb b/backend/spec/system/scenarios/login_flow_spec.rb index 5dcf734..0e59c1e 100644 --- a/backend/spec/system/scenarios/login_flow_spec.rb +++ b/backend/spec/system/scenarios/login_flow_spec.rb @@ -14,16 +14,17 @@ fill_in "password", with: user.password click_button "Login" - ###puts page.text - ###Timeout.timeout(10) do - ### until page.send(:has_content?, user.email_address) - ### sleep 0.01 - ### end - ####rescue Selenium::WebDriver::Error::UnknownError => e - #### puts '-----' - #### puts e.message - #### puts '-----' - ###end + puts page.text + Timeout.timeout(10) do + until page.send(:has_content?, user.email_address) + sleep 0.01 + end + rescue Selenium::WebDriver::Error::UnknownError => e + puts '-----' + puts e.message + puts '-----' + raise + end expect(page).to have_content(user.email_address) expect(page).to have_content("hello, It's me!") @@ -31,15 +32,16 @@ click_button "Logout" end - ###Timeout.timeout(10) do - ### until page.send(:has_content?, "Login") - ### sleep 0.01 - ### end - ####rescue Selenium::WebDriver::Error::UnknownError => e - #### puts '-----' - #### puts e.message - #### puts '-----' - ###end + Timeout.timeout(10) do + until page.send(:has_content?, "Login") + sleep 0.01 + end + rescue Selenium::WebDriver::Error::UnknownError => e + puts '-----' + puts e.message + puts '-----' + raise + end # retry_once(Selenium::WebDriver::Error::UnknownError) { expect(page).to have_content("Login") }