aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features
diff options
context:
space:
mode:
authorXinhui2017-07-04 15:36:25 +0200
committerXinhui2017-07-04 15:36:25 +0200
commite7bea6f00bbd5f2b03db37f5ea44b8098adbadf2 (patch)
tree4bf38a00a7cd21da1114cef0adb2ac78bf89bd17 /spec/features
parent332bb514e5450dcd4ce6e995189623d316be167a (diff)
downloadchouette-core-e7bea6f00bbd5f2b03db37f5ea44b8098adbadf2.tar.bz2
Fix workbench#show should keep filtering on sort
Refs #3871
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/workbenches_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/workbenches_spec.rb b/spec/features/workbenches_spec.rb
index 1eb20dd40..9a40a8376 100644
--- a/spec/features/workbenches_spec.rb
+++ b/spec/features/workbenches_spec.rb
@@ -121,6 +121,18 @@ describe 'Workbenches', type: :feature do
expect(page).to_not have_content(other_referential.name)
end
+ it 'should keep filtering on sort' do
+ dates = referential.validity_period.to_a
+ fill_validity_field dates[0], 'begin_gteq'
+ fill_validity_field dates[1], 'end_lteq'
+ click_button 'Filtrer'
+
+ find('a[href*="&sort=validity_period"]').click
+
+ expect(page).to have_content(referential.name)
+ expect(page).to_not have_content(other_referential.name)
+ end
+
it 'should not show results for out off range' do
fill_validity_field(Date.today - 2.year, 'begin_gteq')
fill_validity_field(Date.today - 1.year, 'end_lteq')