Wait longer for filter values to be loaded

pull/5734/head
Oliver Günther 7 years ago
parent bcdedaff15
commit 04d48ecec9
  1. 11
      spec/features/work_packages/table/filter_spec.rb
  2. 2
      spec/support/components/work_packages/filters.rb
  3. 3
      spec/support/pages/work_packages_table.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]

@ -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'

@ -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

Loading…
Cancel
Save