Schedules!
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
Feature: Workshop Page
|
||||
In order to facilitate and attend workshops
|
||||
As a visitor
|
||||
|
||||
Scenario: View published schedule
|
||||
Given There is an upcoming conference in Boise ID
|
||||
And Registration is open
|
||||
|
||||
And a location named The Shop exists
|
||||
|
||||
And a workshop titled Bikes and Beers exists
|
||||
And the workshop is scheduled for day 2 at 9:00 at The Shop
|
||||
|
||||
And a workshop titled Bike Art exists
|
||||
And the workshop is scheduled for day 2 at 12:00 at The Shop
|
||||
|
||||
And a workshop titled Advocacy Now! exists
|
||||
And the workshop is scheduled for day 2 at 14:00 at The Shop
|
||||
|
||||
And a workshop titled Public Outreach exists
|
||||
And the workshop is scheduled for day 2 at 21:00 at The Shop
|
||||
|
||||
And the workshop schedule is published
|
||||
|
||||
And I am on the landing page
|
||||
Then I see the Bike!Bike! logo
|
||||
@@ -111,6 +111,30 @@ Given(/^a workshop( titled .+)? exists?$/) do |title|
|
||||
@last_workshop = workshop
|
||||
end
|
||||
|
||||
Given(/^the workshop is scheduled for day (\d+) at (\d\d?):(\d\d) at (.+)$/) do |day, hour, minute, location|
|
||||
@last_workshop.start_time = @last_conference.start_date.change({hour: hour.to_i, min: minute.to_i}) + (day.to_i - 1).days
|
||||
@last_workshop.end_time = @last_workshop.start_time + 1.5.hours
|
||||
#puts " === [#{location}] === "
|
||||
#puts EventLocation.all.to_yaml.to_s
|
||||
@last_workshop.event_location_id = EventLocation.find_by_title(location).id
|
||||
@last_workshop.save
|
||||
end
|
||||
|
||||
Given(/^the workshop schedule is (not )?published$/) do |is_not_published|
|
||||
@last_conference.workshop_schedule_published = is_not_published ? false : true
|
||||
@last_conference.save
|
||||
end
|
||||
|
||||
Given(/^a location( named .+)? exists?$/) do |title|
|
||||
location = EventLocation.new
|
||||
location.conference_id = @last_conference.id
|
||||
location.title = title ? title.gsub(/^\s*named\s*(.*?)\s*$/, '\1') : Forgery::LoremIpsum.sentence({:random => true}).gsub(/\.$/, '').titlecase
|
||||
#location.info = Forgery::LoremIpsum.paragraph({:random => true})
|
||||
#location.locale = :en
|
||||
location.save
|
||||
@last_location = location
|
||||
end
|
||||
|
||||
Given(/^(I )have created a workshop titled (.+)( with (\d+) facilitators)?$/) do |a, title, b, facilitator_count|
|
||||
workshop = Workshop.new
|
||||
workshop.conference_id = @last_conference.id
|
||||
|
||||
@@ -298,3 +298,52 @@
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in Boise ID": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: Boise
|
||||
short_name: Boise
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Ada County
|
||||
short_name: Ada County
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Idaho
|
||||
short_name: ID
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: United States
|
||||
short_name: US
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: Boise, ID, USA
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 43.6898951
|
||||
lng: -116.101909
|
||||
southwest:
|
||||
lat: 43.511717
|
||||
lng: -116.3658869
|
||||
location:
|
||||
lat: 43.6187102
|
||||
lng: -116.2146068
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 43.6898951
|
||||
lng: -116.101909
|
||||
southwest:
|
||||
lat: 43.511717
|
||||
lng: -116.3658869
|
||||
partial_match: true
|
||||
place_id: ChIJnbRH6XLxrlQRm51nNpuYW5o
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
|
||||
Reference in New Issue
Block a user