From 4a2c8dd2342d4c6f32c86c6cba3b3560ffbdd6da Mon Sep 17 00:00:00 2001 From: Dominik Klein Date: Thu, 7 Oct 2021 13:20:51 +0200 Subject: [PATCH] Maintenance: Try to improve the stabilzation of the ticket create selenium test. --- spec/support/capybara/common_actions.rb | 2 ++ spec/system/ticket/create_spec.rb | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/support/capybara/common_actions.rb b/spec/support/capybara/common_actions.rb index d9e640221..309b422c5 100644 --- a/spec/support/capybara/common_actions.rb +++ b/spec/support/capybara/common_actions.rb @@ -92,6 +92,8 @@ module CommonActions # def logout visit('logout') + + wait.until_disappears { find('.user-menu .user a', wait: false) } end # Overwrites the Capybara::Session#visit method to allow SPA navigation diff --git a/spec/system/ticket/create_spec.rb b/spec/system/ticket/create_spec.rb index 2988643d3..f4776874b 100644 --- a/spec/system/ticket/create_spec.rb +++ b/spec/system/ticket/create_spec.rb @@ -535,8 +535,7 @@ RSpec.describe 'Ticket Create', type: :system do let(:customer) { create(:customer, password: 'test') } it 'customer user should not have agent object attributes', authenticated_as: :agent do - visit 'ticket/create' - + # Log out again, so that we can execute the next login. logout # Re-create agent session and fetch object attributes.