From d9e62c7110d662a64573e7b7e19cfab9adcd6726 Mon Sep 17 00:00:00 2001 From: Dominik Klein Date: Fri, 11 Feb 2022 10:17:11 +0100 Subject: [PATCH] Maintenance: Try to make the maintenance login message selenium test more robust. --- spec/system/login/message_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/system/login/message_spec.rb b/spec/system/login/message_spec.rb index b8f5a7b4b..f01ec62e0 100644 --- a/spec/system/login/message_spec.rb +++ b/spec/system/login/message_spec.rb @@ -21,6 +21,8 @@ RSpec.describe 'Login Message', type: :system, authenticated_as: false do it 'hides message on the go' do open_login_page + expect(page).to have_css('.js-maintenanceLogin', text: message) + Setting.set 'maintenance_login', false expect(page).to have_no_css('.js-maintenanceLogin', text: message, wait: 30) @@ -29,6 +31,8 @@ RSpec.describe 'Login Message', type: :system, authenticated_as: false do it 'changes message text on the go' do open_login_page + expect(page).to have_css('.js-maintenanceLogin', text: message) + Setting.set 'maintenance_login_message', alt_message expect(page).to have_css('.js-maintenanceLogin', text: alt_message, wait: 30)