Browse Source

Maintenance: Try to improve the stabilzation of the ticket create selenium test.

Dominik Klein 3 years ago
parent
commit
4a2c8dd234
2 changed files with 3 additions and 2 deletions
  1. 2 0
      spec/support/capybara/common_actions.rb
  2. 1 2
      spec/system/ticket/create_spec.rb

+ 2 - 0
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

+ 1 - 2
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.