Skip to content

Commit

Permalink
Adapt login feature beta tests for mobile
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Navarro <enavarro@suse.com>
  • Loading branch information
David Kang and eduardoj committed May 20, 2020
1 parent 1319bbc commit 91267e8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/api/spec/features/beta/webui/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@

scenario 'login via widget' do
visit root_path
within('#navigation') do
within(desktop? ? '#navigation' : '#bottom-navigation') do
click_link('Log In')
end

within('#log-in-modal') do
fill_in 'username', with: user.login
fill_in 'password', with: 'buildservice'
click_button('Log In')
end
within('#log-in-modal') do
fill_in 'username', with: user.login
fill_in 'password', with: 'buildservice'
click_button('Log In')
end

expect(page).to have_link('Your Home Project', visible: false)
end

scenario 'login with wrong data' do
visit root_path
within('#navigation') do
within(desktop? ? '#navigation' : '#bottom-navigation') do
click_link('Log In')
end

within('#log-in-modal') do
fill_in 'username', with: user.login
fill_in 'password', with: 'foo'
click_button('Log In')
end
within('#log-in-modal') do
fill_in 'username', with: user.login
fill_in 'password', with: 'foo'
click_button('Log In')
end

expect(page).to have_content('Authentication failed')
Expand Down

0 comments on commit 91267e8

Please sign in to comment.