Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

adapt spec to bumped capybara

ulfertsdaf9a702625d
diff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rb
index 9534a1295b2..c42ddf1ec82 100644
--- a/spec/features/projects/projects_index_spec.rb
+++ b/spec/features/projects/projects_index_spec.rb
@@ -539,10 +539,10 @@ describe 'Projects index page',
cf_filter = page.find("li[filter-name='cf_#{list_custom_field.id}']")
within(cf_filter) do
# Initial filter is a 'single select'
- expect(cf_filter.find(:select, 'value')[:multiple]).to be_falsey
+ expect(cf_filter.find(:select, 'value')).not_to be_multiple
click_on 'Toggle multiselect'
# switching to multiselect keeps the current selection
- expect(cf_filter.find(:select, 'value')[:multiple]).to be_truthy
+ expect(cf_filter.find(:select, 'value')).to be_multiple
expect(cf_filter).to have_select('value', selected: list_custom_field.possible_values[2].value)
select list_custom_field.possible_values[3].value, from: 'value'
@@ -553,7 +553,7 @@ describe 'Projects index page',
cf_filter = page.find("li[filter-name='cf_#{list_custom_field.id}']")
within(cf_filter) do
# Query has two values for that filter, so it shoud show a 'multi select'.
- expect(cf_filter.find(:select, 'value')[:multiple]).to be_truthy
+ expect(cf_filter.find(:select, 'value')).to be_multiple
expect(cf_filter)
.to have_select('value',
selected: [list_custom_field.possible_values[2].value,
@@ -564,7 +564,7 @@ describe 'Projects index page',
unselect list_custom_field.possible_values[2].value, from: 'value'
click_on 'Toggle multiselect'
- expect(cf_filter.find(:select, 'value')[:multiple]).to be_falsey
+ expect(cf_filter.find(:select, 'value')).not_to be_multiple
expect(cf_filter).to have_select('value', selected: list_custom_field.possible_values[1].value)
expect(cf_filter).to_not have_select('value', selected: list_custom_field.possible_values[3].value)
end
@@ -574,7 +574,7 @@ describe 'Projects index page',
cf_filter = page.find("li[filter-name='cf_#{list_custom_field.id}']")
within(cf_filter) do
# Query has one value for that filter, so it should show a 'single select'.
- expect(cf_filter.find(:select, 'value')[:multiple]).to be_falsey
+ expect(cf_filter.find(:select, 'value')).not_to be_multiple
end
# CF date filter work (at least for one operator)