diff options
| author | jpl | 2017-04-24 15:54:38 +0200 | 
|---|---|---|
| committer | jpl | 2017-04-24 15:54:38 +0200 | 
| commit | a15f093ac5cc18db24c44f5480b3552357926360 (patch) | |
| tree | 884a64276e63a2d618cdc427723cd439a5035197 /spec/features/calendars_spec.rb | |
| parent | a6b5d381f5160a7636b076d94886545af55c9fc5 (diff) | |
| download | chouette-core-a15f093ac5cc18db24c44f5480b3552357926360.tar.bz2 | |
Refs #3149: fixing some tests, contains_date method has to be fixed
Diffstat (limited to 'spec/features/calendars_spec.rb')
| -rw-r--r-- | spec/features/calendars_spec.rb | 20 | 
1 files changed, 12 insertions, 8 deletions
| diff --git a/spec/features/calendars_spec.rb b/spec/features/calendars_spec.rb index c1701d7c7..d82c71a18 100644 --- a/spec/features/calendars_spec.rb +++ b/spec/features/calendars_spec.rb @@ -20,7 +20,7 @@ describe 'Calendars', type: :feature do      context 'filtering' do        it 'supports filtering by short name' do          fill_in 'q[short_name_cont]', with: calendars.first.short_name -        click_button 'search-btn' +        click_button 'search_btn'          expect(page).to have_content(calendars.first.short_name)          expect(page).not_to have_content(calendars.last.short_name)        end @@ -28,8 +28,9 @@ describe 'Calendars', type: :feature do        it 'supports filtering by shared' do          shared_calendar = create :calendar, organisation_id: 1, shared: true          visit calendars_path -        select I18n.t('calendars.index.shared'), from: 'q[shared_eq]' -        click_button 'search-btn' +        # select I18n.t('true'), from: 'q[shared]' +        find(:css, '#q_shared').set(true) +        click_button 'filter_btn'          expect(page).to have_content(shared_calendar.short_name)          expect(page).not_to have_content(calendars.first.short_name)        end @@ -37,12 +38,16 @@ describe 'Calendars', type: :feature do        it 'supports filtering by date' do          july_calendar = create :calendar, dates: [Date.new(2017, 7, 7)], date_ranges: [Date.new(2017, 7, 15)..Date.new(2017, 7, 30)], organisation_id: 1          visit calendars_path -        fill_in 'q_contains_date', with: '2017/07/07' -        click_button 'search-btn' +        select '7', from: 'q_contains_date_3i' +        select 'juillet', from: 'q_contains_date_2i' +        select '2017', from: 'q_contains_date_1i' +        click_button 'filter_btn'          expect(page).to have_content(july_calendar.short_name)          expect(page).not_to have_content(calendars.first.short_name) -        fill_in 'q_contains_date', with: '2017/07/18' -        click_button 'search-btn' +        select '18', from: 'q_contains_date_3i' +        select 'juillet', from: 'q_contains_date_2i' +        select '2017', from: 'q_contains_date_1i' +        click_button 'filter_btn'          expect(page).to have_content(july_calendar.short_name)          expect(page).not_to have_content(calendars.first.short_name)        end @@ -56,4 +61,3 @@ describe 'Calendars', type: :feature do      end    end  end - | 
