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

attempt to fix flickering spec

ulferts27e0483363cf
diff --git a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb
index b76eded6d0b..ae343baaa2a 100644
--- a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb
+++ b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb
@@ -15,6 +15,8 @@ RSpec.describe "My Account 2FA configuration",
password_confirmation: user_password)
end
+ include Flash::Expectations
+
before do
login_as user
end
@@ -118,6 +120,8 @@ RSpec.describe "My Account 2FA configuration",
find(".two-factor--mark-default-button").click
dialog.confirm_flow_with user_password, should_fail: false
+ expect_and_dismiss_flash(message: "Successful update")
+
expect(page).to have_css(".mobile-otp--two-factor-device-row", count: 2)
rows = page.all(".mobile-otp--two-factor-device-row")
expect(rows[0]).to have_css(".mobile-otp--two-factor-device-row td .icon-yes", count: 1)