Skip to content

Commit

Permalink
[#58087] adapted test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Sep 26, 2024
1 parent 4c5a21c commit d282694
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/features/admin/oauth/oauth_applications_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@
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
Expand Down

0 comments on commit d282694

Please sign in to comment.