Commit 3ac444b8 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fix trigger elements and element is not clickable at this position

parent 59bb5bc5
...@@ -31,7 +31,7 @@ describe 'User comments on a diff', :js do ...@@ -31,7 +31,7 @@ describe 'User comments on a diff', :js do
page.within('.files > div:nth-child(3)') do page.within('.files > div:nth-child(3)') do
expect(page).to have_content('Line is wrong') 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') expect(page).not_to have_content('Line is wrong')
end end
...@@ -64,7 +64,7 @@ describe 'User comments on a diff', :js do ...@@ -64,7 +64,7 @@ describe 'User comments on a diff', :js do
# Hide the comment. # Hide the comment.
page.within('.files > div:nth-child(3)') do 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') expect(page).not_to have_content('Line is wrong')
end end
...@@ -77,7 +77,7 @@ describe 'User comments on a diff', :js do ...@@ -77,7 +77,7 @@ describe 'User comments on a diff', :js do
# Show the comment. # Show the comment.
page.within('.files > div:nth-child(3)') do page.within('.files > div:nth-child(3)') do
find('.js-toggle-diff-comments').trigger('click') find('.js-toggle-diff-comments').click
end end
# Now both the comments should be shown. # Now both the comments should be shown.
...@@ -90,7 +90,9 @@ describe 'User comments on a diff', :js do ...@@ -90,7 +90,9 @@ describe 'User comments on a diff', :js do
end end
# Check the same comments in the side-by-side view. # 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 wait_for_requests
...@@ -157,7 +159,7 @@ describe 'User comments on a diff', :js do ...@@ -157,7 +159,7 @@ describe 'User comments on a diff', :js do
end end
page.within('.merge-request-tabs') do page.within('.merge-request-tabs') do
find('.notes-tab').trigger('click') find('.notes-tab').click
end end
wait_for_requests wait_for_requests
......
...@@ -48,7 +48,7 @@ feature 'Protected Branches', :js do ...@@ -48,7 +48,7 @@ feature 'Protected Branches', :js do
expect(page).to have_content('fix') expect(page).to have_content('fix')
expect(find('.all-branches')).to have_selector('li', count: 1) 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]') expect(page).to have_css('.js-delete-branch[disabled]')
fill_in 'delete_branch_input', with: 'fix' fill_in 'delete_branch_input', with: 'fix'
...@@ -67,9 +67,9 @@ feature 'Protected Branches', :js do ...@@ -67,9 +67,9 @@ feature 'Protected Branches', :js do
form = '.js-new-protected-branch' form = '.js-new-protected-branch'
within form do within form do
find(".js-allowed-to-merge").trigger('click') find(".js-allowed-to-merge").click
click_link 'No one' click_link 'No one'
find(".js-allowed-to-push").trigger('click') find(".js-allowed-to-push").click
click_link 'Developers + Masters' click_link 'Developers + Masters'
end end
...@@ -171,7 +171,7 @@ feature 'Protected Branches', :js do ...@@ -171,7 +171,7 @@ feature 'Protected Branches', :js do
end end
def set_protected_branch_name(branch_name) 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) find(".dropdown-input-field").set(branch_name)
click_on("Create wildcard #{branch_name}") click_on("Create wildcard #{branch_name}")
end end
......
...@@ -34,7 +34,7 @@ shared_examples "protected branches > access control > CE" do ...@@ -34,7 +34,7 @@ shared_examples "protected branches > access control > CE" do
within('.js-allowed-to-push-container') do within('.js-allowed-to-push-container') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
click_on access_type_name find(:link, access_type_name).click
end end
end end
...@@ -79,7 +79,7 @@ shared_examples "protected branches > access control > CE" do ...@@ -79,7 +79,7 @@ shared_examples "protected branches > access control > CE" do
within('.js-allowed-to-merge-container') do within('.js-allowed-to-merge-container') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
click_on access_type_name find(:link, access_type_name).click
end end
end 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