OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Switch `admin/oauth/oauth_applications_management_spec` to cuprite
Aaron Contrerasa13cf3bc9c05
diff --git a/spec/features/admin/oauth/oauth_applications_management_spec.rb b/spec/features/admin/oauth/oauth_applications_management_spec.rbindex 9c533b4b682..0152c1936dd 100644--- a/spec/features/admin/oauth/oauth_applications_management_spec.rb+++ b/spec/features/admin/oauth/oauth_applications_management_spec.rb@@ -28,11 +28,13 @@require 'spec_helper'-RSpec.describe 'OAuth applications management', js: true do+RSpec.describe 'OAuth applications management',+ js: true,+ with_cuprite: true dolet(:admin) { create(:admin) }before do- login_as(admin)+ login_as adminvisit oauth_applications_pathend@@ -43,7 +45,6 @@ RSpec.describe 'OAuth applications management', js: true do# Create applicationfind('.button', text: 'Add').click- SeleniumHubWaiter.waitfill_in 'application_name', with: 'My API application'# Fill invalid redirect_urifill_in 'application_redirect_uri', with: "not a url!"@@ -51,7 +52,6 @@ RSpec.describe 'OAuth applications management', js: true doexpect(page).to have_selector('.errorExplanation', text: 'Redirect URI must be an absolute URI.')- SeleniumHubWaiter.waitfill_in('application_redirect_uri', with: "")# Fill rediret_uri which does not provide a Secure Contextfill_in 'application_redirect_uri', with: "http://example.org"@@ -60,7 +60,6 @@ RSpec.describe 'OAuth applications management', js: true doexpect(page).to have_selector('.errorExplanation', text: 'Redirect URI is not providing a "Secure Context"')# Can create localhost without https (https://community.openproject.com/wp/34025)- SeleniumHubWaiter.waitfill_in 'application_redirect_uri', with: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback"click_on 'Create'@@ -74,15 +73,12 @@ RSpec.describe 'OAuth applications management', js: true doexpect(page.first('.attributes-key-value--value code').text).to match /\w+/# Edit again- SeleniumHubWaiter.waitclick_on 'Edit'- SeleniumHubWaiter.waitfill_in 'application_redirect_uri', with: "urn:ietf:wg:oauth:2.0:oob"click_on 'Save'# Show application- SeleniumHubWaiter.waitfind('td a', text: 'My API application').clickexpect(page).not_to have_selector('.attributes-key-value--key', text: 'Client secret')@@ -90,9 +86,9 @@ RSpec.describe 'OAuth applications management', js: true doexpect(page).to have_selector('.attributes-key-value--key', text: 'Client ID')expect(page).to have_selector('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob")- SeleniumHubWaiter.wait- click_on 'Delete'- page.driver.browser.switch_to.alert.accept+ accept_alert do+ click_on 'Delete'+ end# Table is empty againexpect(page).to have_selector('.generic-table--empty-row', text: 'There is currently nothing to display')