From 58f690069a1a042e4ce97b308e68fa594f40150f Mon Sep 17 00:00:00 2001 From: Dominik Klein Date: Tue, 15 Feb 2022 09:40:03 +0100 Subject: [PATCH] Maintenance: Try to make the maintenance login message test more robust with the waiting on the event bindings. --- spec/system/login/message_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/system/login/message_spec.rb b/spec/system/login/message_spec.rb index 5694c1c0a..825cba384 100644 --- a/spec/system/login/message_spec.rb +++ b/spec/system/login/message_spec.rb @@ -67,9 +67,9 @@ RSpec.describe 'Login Message', type: :system, authenticated_as: false do # TODO: If this works we can maybe move the check for event bindings in a helper function. wait.until do page.evaluate_script("Object.keys(App.Event._allBindings()).find((key) => { - return App.Event._allBindings()[key].find((item) => { - return item.event === 'config_update_local'; - }); + return App.Event._allBindings()[key].filter((item) => { + return item.event === 'config_update_local' || item.event === 'ui:rerender'; + }).length === 2; })") end end