Fix trigger elements and element is not clickable at this position

This commit is contained in:
Jose Ivan Vargas 2017-10-11 16:54:05 -05:00
parent 59bb5bc54f
commit 3ac444b8da
3 changed files with 13 additions and 11 deletions

View File

@ -31,7 +31,7 @@ describe 'User comments on a diff', :js do
page.within('.files > div:nth-child(3)') do
expect(page).to have_content('Line is wrong')
find('.js-toggle-diff-comments').trigger('click')
find('.js-toggle-diff-comments').click
expect(page).not_to have_content('Line is wrong')
end
@ -64,7 +64,7 @@ describe 'User comments on a diff', :js do
# Hide the comment.
page.within('.files > div:nth-child(3)') do
find('.js-toggle-diff-comments').trigger('click')
find('.js-toggle-diff-comments').click
expect(page).not_to have_content('Line is wrong')
end
@ -77,7 +77,7 @@ describe 'User comments on a diff', :js do
# Show the comment.
page.within('.files > div:nth-child(3)') do
find('.js-toggle-diff-comments').trigger('click')
find('.js-toggle-diff-comments').click
end
# Now both the comments should be shown.
@ -90,7 +90,9 @@ describe 'User comments on a diff', :js do
end
# Check the same comments in the side-by-side view.
click_link('Side-by-side')
page.execute_script(
"document.querySelector('#parallel-diff-btn').click()"
)
wait_for_requests
@ -157,7 +159,7 @@ describe 'User comments on a diff', :js do
end
page.within('.merge-request-tabs') do
find('.notes-tab').trigger('click')
find('.notes-tab').click
end
wait_for_requests

View File

@ -48,7 +48,7 @@ feature 'Protected Branches', :js do
expect(page).to have_content('fix')
expect(find('.all-branches')).to have_selector('li', count: 1)
page.find('[data-target="#modal-delete-branch"]').trigger(:click)
page.find('[data-target="#modal-delete-branch"]').click
expect(page).to have_css('.js-delete-branch[disabled]')
fill_in 'delete_branch_input', with: 'fix'
@ -67,9 +67,9 @@ feature 'Protected Branches', :js do
form = '.js-new-protected-branch'
within form do
find(".js-allowed-to-merge").trigger('click')
find(".js-allowed-to-merge").click
click_link 'No one'
find(".js-allowed-to-push").trigger('click')
find(".js-allowed-to-push").click
click_link 'Developers + Masters'
end
@ -171,7 +171,7 @@ feature 'Protected Branches', :js do
end
def set_protected_branch_name(branch_name)
find(".js-protected-branch-select").trigger('click')
find(".js-protected-branch-select").click
find(".dropdown-input-field").set(branch_name)
click_on("Create wildcard #{branch_name}")
end

View File

@ -34,7 +34,7 @@ shared_examples "protected branches > access control > CE" do
within('.js-allowed-to-push-container') do
expect(first("li")).to have_content("Roles")
click_on access_type_name
find(:link, access_type_name).click
end
end
@ -79,7 +79,7 @@ shared_examples "protected branches > access control > CE" do
within('.js-allowed-to-merge-container') do
expect(first("li")).to have_content("Roles")
click_on access_type_name
find(:link, access_type_name).click
end
end