Skip to content

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

[#58087] adapted test logic

Eric Schubertd2826943c5d0
diff --git a/spec/features/admin/oauth/oauth_applications_management_spec.rb b/spec/features/admin/oauth/oauth_applications_management_spec.rb
index fd7c4bbbb1c..7d52221b373 100644
--- a/spec/features/admin/oauth/oauth_applications_management_spec.rb
+++ b/spec/features/admin/oauth/oauth_applications_management_spec.rb
@@ -106,23 +106,23 @@ RSpec.describe "OAuth applications management", :js, :with_cuprite do
within_test_selector("op-admin-oauth--built-in-applications") do
expect(page).to have_test_selector("op-admin-oauth--application", count: 1)
expect(page).to have_link(text: "OpenProject Mobile App")
- expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "On")
+ expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "Off")
find_test_selector("op-admin-oauth--application-enabled-toggle-switch").click
expect(page).not_to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "Loading")
- expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "Off")
+ expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "On")
app.reload
expect(app).to be_builtin
- expect(app).not_to be_enabled
+ expect(app).to be_enabled
find_test_selector("op-admin-oauth--application-enabled-toggle-switch").click
expect(page).not_to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "Loading")
- expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "On")
+ expect(page).to have_test_selector("op-admin-oauth--application-enabled-toggle-switch", text: "Off")
app.reload
expect(app).to be_builtin
- expect(app).to be_enabled
+ expect(app).not_to be_enabled
click_on "OpenProject Mobile App"
end