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

Used send_keys(:return) for elements that are not clickable at one point

parent 06d41721
...@@ -52,7 +52,7 @@ feature 'Import/Export - Namespace export file cleanup', js: true do ...@@ -52,7 +52,7 @@ feature 'Import/Export - Namespace export file cleanup', js: true do
expect(page).to have_content('Export project') expect(page).to have_content('Export project')
click_link 'Export project' find(:link, 'Export project').send_keys(:return)
visit edit_project_path(project) visit edit_project_path(project)
......
...@@ -45,7 +45,7 @@ feature 'Triggers', js: true do ...@@ -45,7 +45,7 @@ feature 'Triggers', js: true do
visit project_settings_ci_cd_path(@project) visit project_settings_ci_cd_path(@project)
# See if edit page has correct descrption # See if edit page has correct descrption
find('a[title="Edit"]').click find('a[title="Edit"]').send_keys(:return)
expect(page.find('#trigger_description').value).to have_content 'trigger desc' expect(page.find('#trigger_description').value).to have_content 'trigger desc'
end end
...@@ -54,7 +54,7 @@ feature 'Triggers', js: true do ...@@ -54,7 +54,7 @@ feature 'Triggers', js: true do
visit project_settings_ci_cd_path(@project) visit project_settings_ci_cd_path(@project)
# See if edit page opens, then fill in new description and save # See if edit page opens, then fill in new description and save
find('a[title="Edit"]').click find('a[title="Edit"]').send_keys(:return)
fill_in 'trigger_description', with: new_trigger_title fill_in 'trigger_description', with: new_trigger_title
click_button 'Save trigger' click_button 'Save trigger'
...@@ -70,7 +70,7 @@ feature 'Triggers', js: true do ...@@ -70,7 +70,7 @@ feature 'Triggers', js: true do
visit project_settings_ci_cd_path(@project) visit project_settings_ci_cd_path(@project)
# See if the trigger can be edited and description is blank # See if the trigger can be edited and description is blank
find('a[title="Edit"]').click find('a[title="Edit"]').send_keys(:return)
expect(page.find('#trigger_description').value).to have_content '' expect(page.find('#trigger_description').value).to have_content ''
# See if trigger can be updated with description and saved successfully # See if trigger can be updated with description and saved successfully
...@@ -95,7 +95,7 @@ feature 'Triggers', js: true do ...@@ -95,7 +95,7 @@ feature 'Triggers', js: true do
scenario 'take trigger ownership' do scenario 'take trigger ownership' do
# See if "Take ownership" on trigger works post trigger creation # See if "Take ownership" on trigger works post trigger creation
page.accept_confirm do page.accept_confirm do
find('a.btn-trigger-take-ownership').click first(:link, "Take ownership").send_keys(:return)
end end
expect(page.find('.flash-notice')).to have_content 'Trigger was re-assigned.' expect(page.find('.flash-notice')).to have_content 'Trigger was re-assigned.'
...@@ -117,11 +117,12 @@ feature 'Triggers', js: true do ...@@ -117,11 +117,12 @@ feature 'Triggers', js: true do
scenario 'revoke trigger' do scenario 'revoke trigger' do
# See if "Revoke" on trigger works post trigger creation # See if "Revoke" on trigger works post trigger creation
find('a.btn-trigger-revoke').click
page.accept_confirm do page.accept_confirm do
expect(page.find('.flash-notice')).to have_content 'Trigger removed' find('a.btn-trigger-revoke').send_keys(:return)
expect(page).to have_selector('p.settings-message.text-center.append-bottom-default')
end end
expect(page.find('.flash-notice')).to have_content 'Trigger removed'
expect(page).to have_selector('p.settings-message.text-center.append-bottom-default')
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