Commit 5f2cb53d authored by Mike Greiling's avatar Mike Greiling

replace instances of .trigger('click') with .click

parent 6a7a5417
......@@ -129,7 +129,7 @@ describe 'Issue Boards', :js do
end
page.within(find('.board:nth-child(2)')) do
find('.card:nth-child(2)').trigger('click')
find('.card:nth-child(2)').click
end
page.within('.assignee') do
......
......@@ -119,7 +119,7 @@ describe 'New/edit issue', :js do
end
expect(find('a', text: 'Assign to me')).to be_visible
find('a', text: 'Assign to me').trigger('click')
find('a', text: 'Assign to me').click
assignee_ids = page.all('input[name="issue[assignee_ids][]"]', visible: false)
expect(assignee_ids[0].value).to match(user2.id.to_s)
......
......@@ -15,7 +15,7 @@ feature 'New project' do
it 'shows mirror repository checkbox enabled', :js do
visit new_project_path
find('#import-project-tab').trigger('click')
find('#import-project-tab').click
first('.import_git').click
expect(page).to have_unchecked_field('Mirror repository', disabled: false)
......
......@@ -2,12 +2,12 @@ module EE
module ProtectedBranchHelpers
def set_allowed_to(operation, option = 'Masters', form: '.js-new-protected-branch')
within form do
find(".js-allowed-to-#{operation}").trigger('click')
find(".js-allowed-to-#{operation}").click
wait_for_requests
Array(option).each { |opt| click_on(opt) }
find(".js-allowed-to-#{operation}").trigger('click') # needed to submit form in some cases
find(".js-allowed-to-#{operation}").click # needed to submit form in some cases
end
end
end
......
......@@ -210,9 +210,9 @@ describe 'Board with milestone', :js do
find('#board-new-name').set 'test'
find('button', text: 'Any Milestone').trigger('click')
find('button', text: 'Any Milestone').click
find('a', text: milestone.title).trigger('click')
find('a', text: milestone.title).click
click_button 'Create'
end
......
......@@ -6,7 +6,7 @@ feature 'Group elastic search', :js do
let(:project) { create(:project, :repository, namespace: group) }
def choose_group(group)
find('.js-search-group-dropdown').trigger('click')
find('.js-search-group-dropdown').click
wait_for_requests
page.within '.search-holder' do
......@@ -41,7 +41,7 @@ feature 'Group elastic search', :js do
choose_group group
fill_in 'search', with: 'chosen'
find('.btn-search').trigger('click')
find('.btn-search').click
select_filter('Issues')
expect(page).to have_content('chosen issue title')
......@@ -60,7 +60,7 @@ feature 'Group elastic search', :js do
choose_group group
fill_in 'search', with: 'def'
find('.btn-search').trigger('click')
find('.btn-search').click
select_filter('Code')
......@@ -83,7 +83,7 @@ feature 'Group elastic search', :js do
choose_group group
fill_in "search", with: "term"
find('.btn-search').trigger('click')
find('.btn-search').click
select_filter("Wiki")
......@@ -104,7 +104,7 @@ feature 'Group elastic search', :js do
choose_group group
fill_in 'search', with: 'add'
find('.btn-search').trigger('click')
find('.btn-search').click
select_filter('Commits')
......
......@@ -14,7 +14,7 @@ feature 'Groups > Contribution Analytics', :js do
it 'displays Contribution Analytics' do
visit group_path(group)
find('a', text: 'Contribution Analytics').trigger('click')
find('a', text: 'Contribution Analytics').click
expect(page).to have_content "Contribution analytics for issues, merge requests and push"
end
......
......@@ -46,8 +46,7 @@ feature 'Groups > Audit Events', :js do
click_link 'Master'
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
find(:link, text: 'Settings').trigger('click')
find(:link, text: 'Settings').click
click_link 'Audit Events'
......
......@@ -97,8 +97,7 @@ feature 'Projects > Audit Events', :js do
click_link 'Master'
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
find(:link, text: 'Settings').trigger('click')
find(:link, text: 'Settings').click
click_link 'Audit Events'
......
......@@ -86,7 +86,7 @@ describe 'Promotions', :js do
visit edit_project_path(project)
within('#promote_service_desk') do
find('.close').trigger('click')
find('.close').click
end
visit edit_project_path(project)
......@@ -113,7 +113,7 @@ describe 'Promotions', :js do
visit edit_project_path(project)
within('#promote_mr_features') do
find('.close').trigger('click')
find('.close').click
end
visit edit_project_path(project)
......@@ -141,7 +141,7 @@ describe 'Promotions', :js do
visit project_settings_repository_path(project)
within('#promote_repository_features') do
find('.close').trigger('click')
find('.close').click
end
visit project_settings_repository_path(project)
......@@ -168,7 +168,7 @@ describe 'Promotions', :js do
visit project_new_merge_request_path(project, merge_request: { target_branch: 'master', source_branch: 'feature' })
within('#promote_squash_commits') do
find('.close').trigger('click')
find('.close').click
end
visit project_new_merge_request_path(project, merge_request: { target_branch: 'master', source_branch: 'feature' })
......@@ -195,7 +195,7 @@ describe 'Promotions', :js do
visit project_milestone_path(project, milestone)
within('#promote_burndown_charts') do
find('.close').trigger('click')
find('.close').click
end
visit project_milestone_path(project, milestone)
......@@ -222,7 +222,7 @@ describe 'Promotions', :js do
visit project_boards_path(project)
within('.board-promotion-state') do
find('#hide-btn').trigger('click')
find('#hide-btn').click
end
visit project_boards_path(project, milestone)
......@@ -338,7 +338,7 @@ describe 'Promotions', :js do
visit search_path
fill_in 'search', with: 'chosen'
find('.btn-search').trigger('click')
find('.btn-search').click
expect(find('#promote_advanced_search')).to have_content 'Improve search with Advanced Global Search and GitLab Enterprise Edition.'
end
......@@ -347,16 +347,16 @@ describe 'Promotions', :js do
visit search_path
fill_in 'search', with: 'chosen'
find('.btn-search').trigger('click')
find('.btn-search').click
within('#promote_advanced_search') do
find('.close').trigger('click')
find('.close').click
end
visit search_path
fill_in 'search', with: 'chosen'
find('.btn-search').trigger('click')
find('.btn-search').click
expect(page).not_to have_selector('#promote_advanced_search')
end
......
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