Commit 7a5c2d5e authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fix Element is not clickable at this point

parent bd2822ce
...@@ -405,7 +405,7 @@ feature 'Issues > Labels bulk assignment' do ...@@ -405,7 +405,7 @@ feature 'Issues > Labels bulk assignment' do
end end
def update_issues def update_issues
find('.update-selected-issues').trigger('click') find('.update-selected-issues').send_keys(:return)
wait_for_requests wait_for_requests
end end
......
...@@ -23,11 +23,11 @@ feature 'Merge request conflict resolution', js: true do ...@@ -23,11 +23,11 @@ feature 'Merge request conflict resolution', js: true do
within find('.files-wrapper .diff-file', text: 'files/ruby/regex.rb') do within find('.files-wrapper .diff-file', text: 'files/ruby/regex.rb') do
all('button', text: 'Use ours').each do |button| all('button', text: 'Use ours').each do |button|
button.click button.send_keys(:return)
end end
end end
click_button 'Commit conflict resolution' find_button('Commit conflict resolution').send_keys(:return)
expect(page).to have_content('All merge conflicts were resolved') expect(page).to have_content('All merge conflicts were resolved')
merge_request.reload_diff merge_request.reload_diff
...@@ -69,7 +69,7 @@ feature 'Merge request conflict resolution', js: true do ...@@ -69,7 +69,7 @@ feature 'Merge request conflict resolution', js: true do
execute_script('ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");') execute_script('ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");')
end end
click_button 'Commit conflict resolution' find_button('Commit conflict resolution').send_keys(:return)
expect(page).to have_content('All merge conflicts were resolved') expect(page).to have_content('All merge conflicts were resolved')
merge_request.reload_diff merge_request.reload_diff
......
...@@ -86,7 +86,7 @@ feature 'Diff note avatars', js: true do ...@@ -86,7 +86,7 @@ feature 'Diff note avatars', js: true do
it 'shows note avatar' do it 'shows note avatar' do
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').click find('.diff-notes-collapse').send_keys(:return)
expect(page).to have_selector('img.js-diff-comment-avatar', count: 1) expect(page).to have_selector('img.js-diff-comment-avatar', count: 1)
end end
...@@ -94,7 +94,7 @@ feature 'Diff note avatars', js: true do ...@@ -94,7 +94,7 @@ feature 'Diff note avatars', js: true do
it 'shows comment on note avatar' do it 'shows comment on note avatar' do
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').click find('.diff-notes-collapse').send_keys(:return)
expect(first('img.js-diff-comment-avatar')["data-original-title"]).to eq("#{note.author.name}: #{note.note.truncate(17)}") expect(first('img.js-diff-comment-avatar')["data-original-title"]).to eq("#{note.author.name}: #{note.note.truncate(17)}")
end end
...@@ -102,13 +102,13 @@ feature 'Diff note avatars', js: true do ...@@ -102,13 +102,13 @@ feature 'Diff note avatars', js: true do
it 'toggles comments when clicking avatar' do it 'toggles comments when clicking avatar' do
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').click find('.diff-notes-collapse').send_keys(:return)
end end
expect(page).to have_selector('.notes_holder', visible: false) expect(page).to have_selector('.notes_holder', visible: false)
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
first('img.js-diff-comment-avatar').click first('img.js-diff-comment-avatar').send_keys(:return)
end end
expect(page).to have_selector('.notes_holder') expect(page).to have_selector('.notes_holder')
...@@ -140,7 +140,7 @@ feature 'Diff note avatars', js: true do ...@@ -140,7 +140,7 @@ feature 'Diff note avatars', js: true do
end end
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').trigger('click') find('.diff-notes-collapse').send_keys(:return)
expect(page).to have_selector('img.js-diff-comment-avatar', count: 2) expect(page).to have_selector('img.js-diff-comment-avatar', count: 2)
end end
...@@ -160,7 +160,7 @@ feature 'Diff note avatars', js: true do ...@@ -160,7 +160,7 @@ feature 'Diff note avatars', js: true do
end end
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').click find('.diff-notes-collapse').send_keys(:return)
expect(page).to have_selector('img.js-diff-comment-avatar', count: 3) expect(page).to have_selector('img.js-diff-comment-avatar', count: 3)
expect(find('.diff-comments-more-count')).to have_content '+1' expect(find('.diff-comments-more-count')).to have_content '+1'
...@@ -178,7 +178,7 @@ feature 'Diff note avatars', js: true do ...@@ -178,7 +178,7 @@ feature 'Diff note avatars', js: true do
it 'shows extra comment count' do it 'shows extra comment count' do
page.within find("[id='#{position.line_code(project.repository)}']") do page.within find("[id='#{position.line_code(project.repository)}']") do
find('.diff-notes-collapse').click find('.diff-notes-collapse').send_keys(:return)
expect(find('.diff-comments-more-count')).to have_content '+1' expect(find('.diff-comments-more-count')).to have_content '+1'
end end
......
...@@ -21,7 +21,7 @@ feature 'Project settings > Merge Requests', :js do ...@@ -21,7 +21,7 @@ feature 'Project settings > Merge Requests', :js do
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click
click_on('Save changes') find('input[value="Save changes"]').send_keys(:return)
end end
expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds') expect(page).not_to have_content('Only allow merge requests to be merged if the pipeline succeeds')
...@@ -41,7 +41,7 @@ feature 'Project settings > Merge Requests', :js do ...@@ -41,7 +41,7 @@ feature 'Project settings > Merge Requests', :js do
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][builds_access_level]"] .project-feature-toggle').click find('.project-feature-controls[data-for="project[project_feature_attributes][builds_access_level]"] .project-feature-toggle').click
click_on('Save changes') find('input[value="Save changes"]').send_keys(:return)
end end
expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds') expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds')
...@@ -62,7 +62,7 @@ feature 'Project settings > Merge Requests', :js do ...@@ -62,7 +62,7 @@ feature 'Project settings > Merge Requests', :js do
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click find('.project-feature-controls[data-for="project[project_feature_attributes][merge_requests_access_level]"] .project-feature-toggle').click
click_on('Save changes') find('input[value="Save changes"]').send_keys(:return)
end end
expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds') expect(page).to have_content('Only allow merge requests to be merged if the pipeline succeeds')
......
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