Sha256: eb14a9b83cbfa0b99c019ce2499f3646f5c2ea98b0e59f9be7c757058a49b646
Contents?: true
Size: 1.02 KB
Versions: 9
Compression:
Stored size: 1.02 KB
Contents
require 'rails_helper' feature 'search for events' do background do create :event, title: 'Ruby Future', start_time: today + 1.day create :event, title: 'Python Past', start_time: today - 1.day create :event, title: 'Ruby Part 2 Past', start_time: today - 2.day create :event, title: 'Ruby Part 1 Past', start_time: today - 3.day end scenario 'User searches for an event by name' do visit '/' # We're using send_keys here instead of fill_in in order to trigger the # correct events for JavaScript autocompletion. # # https://github.com/calagator/calagator/pull/448#issuecomment-129621567 find_field('Search Events').native.send_keys "Ruby\n" within('#current') do expect(page).to have_content 'Viewing 1 current event' expect(page).to have_content 'Ruby Future' end within('#past') do expect(page).to have_content 'Viewing 2 past events' expect(page).to have_content 'Ruby Part 2 Past' expect(page).to have_content 'Ruby Part 1 Past' end end end
Version data entries
9 entries across 9 versions & 2 rubygems