diff --git a/spec/features/work_packages/table/filter_spec.rb b/spec/features/work_packages/table/filter_spec.rb index 73707d871a..4252879422 100644 --- a/spec/features/work_packages/table/filter_spec.rb +++ b/spec/features/work_packages/table/filter_spec.rb @@ -88,6 +88,7 @@ describe 'filter work packages', js: true do filters.add_filter_by('Version', 'is', version.name) + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_version] expect(wp_table).not_to have_work_packages_listed [work_package_without_version] @@ -95,12 +96,14 @@ describe 'filter work packages', js: true do filters.remove_filter 'version' + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_version, work_package_without_version] last_query = Query.last wp_table.visit_query(last_query) + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_version] expect(wp_table).not_to have_work_packages_listed [work_package_without_version] @@ -110,6 +113,7 @@ describe 'filter work packages', js: true do filters.set_operator 'Version', 'is not' + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_without_version] expect(wp_table).not_to have_work_packages_listed [work_package_with_version] end @@ -135,6 +139,7 @@ describe 'filter work packages', js: true do [(Date.today - 1.day).strftime('%Y-%m-%d'), Date.today.strftime('%Y-%m-%d')], 'dueDate') + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_due_date] expect(wp_table).not_to have_work_packages_listed [work_package_without_due_date] @@ -142,12 +147,14 @@ describe 'filter work packages', js: true do filters.remove_filter 'dueDate' + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_due_date, work_package_without_due_date] last_query = Query.last wp_table.visit_query(last_query) + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_due_date] expect(wp_table).not_to have_work_packages_listed [work_package_without_due_date] @@ -160,6 +167,7 @@ describe 'filter work packages', js: true do filters.set_filter 'Due date', 'in more than', '1', 'dueDate' + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_without_due_date] expect(wp_table).not_to have_work_packages_listed [work_package_with_due_date] end @@ -215,6 +223,7 @@ describe 'filter work packages', js: true do list_cf.custom_options.last.value, "customField#{list_cf.id}") + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_list_value] expect(wp_table).not_to have_work_packages_listed [work_package_with_anti_list_value] @@ -222,12 +231,14 @@ describe 'filter work packages', js: true do filters.remove_filter "customField#{list_cf.id}" + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_list_value, work_package_with_anti_list_value] last_query = Query.last wp_table.visit_query(last_query) + loading_indicator_saveguard expect(wp_table).to have_work_packages_listed [work_package_with_list_value] expect(wp_table).not_to have_work_packages_listed [work_package_with_anti_list_value] diff --git a/spec/support/components/work_packages/filters.rb b/spec/support/components/work_packages/filters.rb index c8ebc8badb..014968b9b7 100644 --- a/spec/support/components/work_packages/filters.rb +++ b/spec/support/components/work_packages/filters.rb @@ -134,7 +134,7 @@ module Components end def within_values(id) - page.within("#div-values-#{id}") do + page.within("#div-values-#{id}", wait: 10) do inputs = page.first('select, input') yield inputs.tag_name == 'select' diff --git a/spec/support/pages/work_packages_table.rb b/spec/support/pages/work_packages_table.rb index 75392cb5d3..8cdd38f039 100644 --- a/spec/support/pages/work_packages_table.rb +++ b/spec/support/pages/work_packages_table.rb @@ -48,7 +48,8 @@ module Pages within(table_container) do work_packages.each do |wp| expect(page).to have_selector(".wp-row-#{wp.id} td.subject", - text: wp.subject) + text: wp.subject, + wait: 20) end end end