diff options
| author | Zog | 2018-04-27 15:07:25 +0200 | 
|---|---|---|
| committer | Johan Van Ryseghem | 2018-04-27 15:13:51 +0200 | 
| commit | e1425294874b4cd4d71668e7669220252ea2e936 (patch) | |
| tree | 89d2877305ad5e066e47f3692b1d0b619c381eb1 /spec/features | |
| parent | 3ed5ca0e97c287977646b7af6a41632c9dd3ad49 (diff) | |
| download | chouette-core-e1425294874b4cd4d71668e7669220252ea2e936.tar.bz2 | |
Refs #6572; Fix specs
Diffstat (limited to 'spec/features')
| -rw-r--r-- | spec/features/workbenches/workbenches_show_spec.rb | 36 | 
1 files changed, 16 insertions, 20 deletions
| diff --git a/spec/features/workbenches/workbenches_show_spec.rb b/spec/features/workbenches/workbenches_show_spec.rb index 405fdce82..441f829a1 100644 --- a/spec/features/workbenches/workbenches_show_spec.rb +++ b/spec/features/workbenches/workbenches_show_spec.rb @@ -15,10 +15,10 @@ RSpec.describe 'Workbenches', type: :feature do          expect(page).to have_content(referential.name)        end -      it 'should not show unready referentials' do +      it 'should show unready referentials' do          referential.update_attribute(:ready, false)          visit workbench_path(workbench) -        expect(page).to_not have_content(referential.name) +        expect(page).to have_content(referential.name)        end      end @@ -138,38 +138,34 @@ RSpec.describe 'Workbenches', type: :feature do        context 'filter by status' do          it 'should display archived referentials' do -          other_referential.update_attribute(:archived_at, Date.today) -          find("#q_archived_at_not_null").set(true) +          other_referential.failed! +          referential.archived! +          find("input[type=checkbox][name='q[state[archived]]']").set(true)            click_button I18n.t('actions.filter') -          expect(page).to have_content(other_referential.name) -          expect(page).to_not have_content(referential.name) +          expect(page).to have_content(referential.name) +          expect(page).to_not have_content(other_referential.name)          end -        it 'should display both archived and unarchived referentials' do -          other_referential.update_attribute(:archived_at, Date.today) -          find("#q_archived_at_not_null").set(true) -          find("#q_archived_at_null").set(true) +        it 'should display failed referentials' do +          referential.failed! +          other_referential.active! +          find("input[type=checkbox][name='q[state[failed]]']").set(true)            click_button I18n.t('actions.filter')            expect(page).to have_content(referential.name) -          expect(page).to have_content(other_referential.name) +          expect(page).to_not have_content(other_referential.name)          end -        it 'should display unarchived referentials' do -          other_referential.update_attribute(:archived_at, Date.today) -          find("#q_archived_at_null").set(true) +        it 'should display active referentials' do +          referential.active! +          other_referential.failed! +          find("input[type=checkbox][name='q[state[active]]']").set(true)            click_button I18n.t('actions.filter')            expect(page).to have_content(referential.name)            expect(page).to_not have_content(other_referential.name)          end - -        it 'should keep filter value on submit' do -          find("#q_archived_at_null").set(true) -          click_button I18n.t('actions.filter') -          expect(find("#q_archived_at_null")).to be_checked -        end        end        context 'filter by validity period' do | 
