Maintenance: Try to make the maintenance login message selenium test more robust.

This commit is contained in:
Dominik Klein 2022-02-11 10:17:11 +01:00
parent 4c83541c21
commit d9e62c7110

View file

@ -21,6 +21,8 @@ RSpec.describe 'Login Message', type: :system, authenticated_as: false do
it 'hides message on the go' do it 'hides message on the go' do
open_login_page open_login_page
expect(page).to have_css('.js-maintenanceLogin', text: message)
Setting.set 'maintenance_login', false Setting.set 'maintenance_login', false
expect(page).to have_no_css('.js-maintenanceLogin', text: message, wait: 30) 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 it 'changes message text on the go' do
open_login_page open_login_page
expect(page).to have_css('.js-maintenanceLogin', text: message)
Setting.set 'maintenance_login_message', alt_message Setting.set 'maintenance_login_message', alt_message
expect(page).to have_css('.js-maintenanceLogin', text: alt_message, wait: 30) expect(page).to have_css('.js-maintenanceLogin', text: alt_message, wait: 30)