Maintenance: Try to make the maintenance login message test more robust with the waiting on the event bindings.
This commit is contained in:
parent
5aee2830b6
commit
58f690069a
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
# TODO: If this works we can maybe move the check for event bindings in a helper function.
|
||||||
wait.until do
|
wait.until do
|
||||||
page.evaluate_script("Object.keys(App.Event._allBindings()).find((key) => {
|
page.evaluate_script("Object.keys(App.Event._allBindings()).find((key) => {
|
||||||
return App.Event._allBindings()[key].find((item) => {
|
return App.Event._allBindings()[key].filter((item) => {
|
||||||
return item.event === 'config_update_local';
|
return item.event === 'config_update_local' || item.event === 'ui:rerender';
|
||||||
});
|
}).length === 2;
|
||||||
})")
|
})")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue