Fix more specs

This commit is contained in:
Ari Timonen 2020-04-18 08:02:26 +03:00
parent 3712aebaee
commit 494f341cad
4 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@ feature "Case insensitive login", js: :true do
feature "when a user with mixed-case username signs in" do
scenario "with a matching case allows the user to sign in" do
fill_login_form(username)
click_button submit(:user, :login)
find('.login input').trigger('click')
expect(page).to have_content(I18n.t("login_successful"))
@ -23,7 +23,7 @@ feature "Case insensitive login", js: :true do
scenario "with a non-matching case allows the user to sign in" do
fill_login_form("CASE_INSENSITIVE")
click_button submit(:user, :login)
find('.login input').trigger('click')
expect(page).to have_content(I18n.t("login_successful"))

View file

@ -8,8 +8,7 @@ feature "User Stream Information" do
scenario "user updates their stream" do
visit user_path(user)
expect(page.html).to_not include("<dt>Stream</dt>")
fill_login_form(user, password)
click_button submit(:user, :login)
sign_in_as(user)
visit edit_user_path(user)
stream_url = "twitch.tv/gold_n"
expect(page).to have_content("Stream")

View file

@ -41,6 +41,7 @@ Capybara.register_driver :selenium_remote do |app|
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome
)
end
Capybara.default_max_wait_time = 8
#Capybara.javascript_driver = :selenium
#Capybara.javascript_driver = :selenium_remote