From d3ca97a95d5112c7af6cae9d7044f51c7d60cbee Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Fri, 18 Feb 2022 13:08:09 +0100 Subject: [PATCH] Maintenance: Improve overview test to show ticket list by scroll better and added wait to stabilize results. --- spec/system/manage/overviews_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/system/manage/overviews_spec.rb b/spec/system/manage/overviews_spec.rb index 4b3ba5072..caba4d0c8 100644 --- a/spec/system/manage/overviews_spec.rb +++ b/spec/system/manage/overviews_spec.rb @@ -44,6 +44,11 @@ RSpec.describe 'Manage > Overviews', type: :system do let(:overview) { create(:overview, condition: condition) } shared_examples 'previewing the correct ticket for single selected object' do + before do + wait.until { page.has_css?('.js-previewLoader.hide', visible: :all) } + scroll_into_view('.ticket_selector') + end + context "with 'is' operator" do let(:operator) { 'is' } @@ -80,6 +85,11 @@ RSpec.describe 'Manage > Overviews', type: :system do end shared_examples 'previewing the correct ticket for multiple selected objects' do + before do + wait.until { page.has_css?('.js-previewLoader.hide', visible: :all) } + scroll_into_view('.ticket_selector') + end + context "with 'is' operator" do let(:operator) { 'is' }