Commit bea18efa authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Replaced trigger calls for click

parent 7a8514c3
...@@ -41,7 +41,7 @@ feature 'Project > Members > Share with Group', :js do ...@@ -41,7 +41,7 @@ feature 'Project > Members > Share with Group', :js do
select2 group_to_share_with.id, from: '#link_group_id' select2 group_to_share_with.id, from: '#link_group_id'
page.find('body').click page.find('body').click
find('.btn-create').trigger('click') find('.btn-create').click
page.within('.project-members-groups') do page.within('.project-members-groups') do
expect(page).to have_content(group_to_share_with.name) expect(page).to have_content(group_to_share_with.name)
...@@ -123,7 +123,7 @@ feature 'Project > Members > Share with Group', :js do ...@@ -123,7 +123,7 @@ feature 'Project > Members > Share with Group', :js do
fill_in 'expires_at_groups', with: (Time.now + 4.5.days).strftime('%Y-%m-%d') fill_in 'expires_at_groups', with: (Time.now + 4.5.days).strftime('%Y-%m-%d')
page.find('body').click page.find('body').click
find('.btn-create').trigger('click') find('.btn-create').click
end end
scenario 'the group link shows the expiration time with a warning class' do scenario 'the group link shows the expiration time with a warning class' do
......
...@@ -133,7 +133,7 @@ describe 'User views a wiki page' do ...@@ -133,7 +133,7 @@ describe 'User views a wiki page' do
it 'opens a default wiki page', :js do it 'opens a default wiki page', :js do
visit(project_path(project)) visit(project_path(project))
find('.shortcuts-wiki').trigger('click') find('.shortcuts-wiki').click
expect(page).to have_content('Home · Create Page') expect(page).to have_content('Home · Create Page')
end end
......
...@@ -32,14 +32,14 @@ describe 'User searches for code' do ...@@ -32,14 +32,14 @@ describe 'User searches for code' do
include_examples 'top right search form' include_examples 'top right search form'
it 'finds code' do it 'finds code' do
find('.js-search-project-dropdown').trigger('click') find('.js-search-project-dropdown').click
page.within('.project-filter') do page.within('.project-filter') do
click_link(project.name_with_namespace) click_link(project.name_with_namespace)
end end
fill_in('dashboard_search', with: 'rspec') fill_in('dashboard_search', with: 'rspec')
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.results') do page.within('.results') do
expect(find(:css, '.search-results')).to have_content('Update capybara, rspec-rails, poltergeist to recent versions') expect(find(:css, '.search-results')).to have_content('Update capybara, rspec-rails, poltergeist to recent versions')
......
...@@ -18,7 +18,7 @@ describe 'User searches for issues', :js do ...@@ -18,7 +18,7 @@ describe 'User searches for issues', :js do
it 'finds an issue' do it 'finds an issue' do
fill_in('dashboard_search', with: issue1.title) fill_in('dashboard_search', with: issue1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Issues') click_link('Issues')
...@@ -31,14 +31,14 @@ describe 'User searches for issues', :js do ...@@ -31,14 +31,14 @@ describe 'User searches for issues', :js do
context 'when on a project page' do context 'when on a project page' do
it 'finds an issue' do it 'finds an issue' do
find('.js-search-project-dropdown').trigger('click') find('.js-search-project-dropdown').click
page.within('.project-filter') do page.within('.project-filter') do
click_link(project.name_with_namespace) click_link(project.name_with_namespace)
end end
fill_in('dashboard_search', with: issue1.title) fill_in('dashboard_search', with: issue1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Issues') click_link('Issues')
...@@ -62,7 +62,7 @@ describe 'User searches for issues', :js do ...@@ -62,7 +62,7 @@ describe 'User searches for issues', :js do
it 'finds an issue' do it 'finds an issue' do
fill_in('dashboard_search', with: issue1.title) fill_in('dashboard_search', with: issue1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Issues') click_link('Issues')
......
...@@ -17,7 +17,7 @@ describe 'User searches for merge requests', :js do ...@@ -17,7 +17,7 @@ describe 'User searches for merge requests', :js do
it 'finds a merge request' do it 'finds a merge request' do
fill_in('dashboard_search', with: merge_request1.title) fill_in('dashboard_search', with: merge_request1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Merge requests') click_link('Merge requests')
...@@ -30,14 +30,14 @@ describe 'User searches for merge requests', :js do ...@@ -30,14 +30,14 @@ describe 'User searches for merge requests', :js do
context 'when on a project page' do context 'when on a project page' do
it 'finds a merge request' do it 'finds a merge request' do
find('.js-search-project-dropdown').trigger('click') find('.js-search-project-dropdown').click
page.within('.project-filter') do page.within('.project-filter') do
click_link(project.name_with_namespace) click_link(project.name_with_namespace)
end end
fill_in('dashboard_search', with: merge_request1.title) fill_in('dashboard_search', with: merge_request1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Merge requests') click_link('Merge requests')
......
...@@ -17,7 +17,7 @@ describe 'User searches for milestones', :js do ...@@ -17,7 +17,7 @@ describe 'User searches for milestones', :js do
it 'finds a milestone' do it 'finds a milestone' do
fill_in('dashboard_search', with: milestone1.title) fill_in('dashboard_search', with: milestone1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Milestones') click_link('Milestones')
...@@ -30,14 +30,14 @@ describe 'User searches for milestones', :js do ...@@ -30,14 +30,14 @@ describe 'User searches for milestones', :js do
context 'when on a project page' do context 'when on a project page' do
it 'finds a milestone' do it 'finds a milestone' do
find('.js-search-project-dropdown').trigger('click') find('.js-search-project-dropdown').click
page.within('.project-filter') do page.within('.project-filter') do
click_link(project.name_with_namespace) click_link(project.name_with_namespace)
end end
fill_in('dashboard_search', with: milestone1.title) fill_in('dashboard_search', with: milestone1.title)
find('.btn-search').trigger('click') find('.btn-search').click
page.within('.search-filter') do page.within('.search-filter') do
click_link('Milestones') click_link('Milestones')
......
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