Commit b172edc1 authored by Kushal Pandya's avatar Kushal Pandya

Enable JS on 2FA page to catch validation errors

Enables JavaScript on specs which is responsible for triggering
HTML5 form validation on 2FA page in case the code provided
is invalid.
parent 189fe430
...@@ -152,7 +152,7 @@ describe 'Login' do ...@@ -152,7 +152,7 @@ describe 'Login' do
end end
end end
describe 'with two-factor authentication' do describe 'with two-factor authentication', :js do
def enter_code(code) def enter_code(code)
fill_in 'user_otp_attempt', with: code fill_in 'user_otp_attempt', with: code
click_button 'Verify code' click_button 'Verify code'
......
...@@ -13,7 +13,7 @@ module UserLoginHelper ...@@ -13,7 +13,7 @@ module UserLoginHelper
def ensure_tab_pane_counts def ensure_tab_pane_counts
tabs_count = page.all('[role="tab"]').size tabs_count = page.all('[role="tab"]').size
expect(page).to have_selector('[role="tabpanel"]', count: tabs_count) expect(page).to have_selector('[role="tabpanel"]', visible: :all, count: tabs_count)
end end
def ensure_one_active_tab def ensure_one_active_tab
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment