Another round of splash design

* Add map to splash
* Reverse venue<->conference relation
* Split venue address into fields
* Don't go through venue for lodgings anymore
This commit is contained in:
Henne Vogelsang 2014-11-20 14:57:03 +01:00
parent 30e8ab856c
commit cb227a0afc
55 changed files with 717 additions and 548 deletions

View file

@ -29,7 +29,7 @@ feature 'Has correct abilities' do
expect(page).to have_link('Schedule', href: "/admin/conference/#{conference1.short_title}/schedule")
expect(page).to have_link('Campaigns', href: "/admin/conference/#{conference1.short_title}/campaigns")
expect(page).to have_link('Goals', href: "/admin/conference/#{conference1.short_title}/targets")
expect(page).to have_link('Venue', href: "/admin/conference/#{conference1.short_title}/venue/edit")
expect(page).to have_link('Venue', href: "/admin/conference/#{conference1.short_title}/venue")
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference1.short_title}/rooms")
expect(page).to have_link('Lodgings', href: "/admin/conference/#{conference1.short_title}/lodgings")
expect(page).to have_link('Sponsorship', href: "/admin/conference/#{conference1.short_title}/sponsorship_levels")
@ -100,7 +100,7 @@ feature 'Has correct abilities' do
expect(page).to have_link('Schedule', href: "/admin/conference/#{conference2.short_title}/schedule")
expect(page).to_not have_link('Campaigns', href: "/admin/conference/#{conference2.short_title}/campaigns")
expect(page).to_not have_link('Goals', href: "/admin/conference/#{conference2.short_title}/targets")
expect(page).to have_link('Venue', href: "/admin/conference/#{conference2.short_title}/venue/edit")
expect(page).to have_link('Venue', href: "/admin/conference/#{conference2.short_title}/venue")
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference2.short_title}/rooms")
expect(page).to_not have_link('Lodgings', href: "/admin/conference/#{conference2.short_title}/lodgings")
expect(page).to_not have_link('Sponsorship', href: "/admin/conference/#{conference2.short_title}/sponsorship_levels")
@ -171,7 +171,7 @@ feature 'Has correct abilities' do
expect(page).to_not have_link('Schedule', href: "/admin/conference/#{conference3.short_title}/schedule")
expect(page).to_not have_link('Campaigns', href: "/admin/conference/#{conference3.short_title}/campaigns")
expect(page).to_not have_link('Targets', href: "/admin/conference/#{conference3.short_title}/targets")
expect(page).to_not have_link('Venue', href: "/admin/conference/#{conference3.short_title}/venue/edit")
expect(page).to_not have_link('Venue', href: "/admin/conference/#{conference3.short_title}/venue")
expect(page).to_not have_link('Rooms', href: "/admin/conference/#{conference3.short_title}/rooms")
expect(page).to_not have_link('Lodgings', href: "/admin/conference/#{conference3.short_title}/lodgings")
expect(page).to_not have_link('Sponsorship', href: "/admin/conference/#{conference3.short_title}/sponsorship_levels")
@ -243,7 +243,7 @@ feature 'Has correct abilities' do
expect(page).to_not have_link('Schedule', href: "/admin/conference/#{conference4.short_title}/schedule")
expect(page).to_not have_link('Campaigns', href: "/admin/conference/#{conference4.short_title}/campaigns")
expect(page).to_not have_link('Goals', href: "/admin/conference/#{conference4.short_title}/targets")
expect(page).to_not have_link('Venue', href: "/admin/conference/#{conference4.short_title}/venue/edit")
expect(page).to_not have_link('Venue', href: "/admin/conference/#{conference4.short_title}/venue")
expect(page).to_not have_link('Rooms', href: "/admin/conference/#{conference4.short_title}/rooms")
expect(page).to_not have_link('Lodgings', href: "/admin/conference/#{conference4.short_title}/lodgings")
expect(page).to_not have_link('Sponsorship', href: "/admin/conference/#{conference4.short_title}/sponsorship_levels")

View file

@ -8,7 +8,6 @@ feature Lodging do
scenario 'Add a lodging', feature: true, js: true do
path = "#{Rails.root}/app/assets/images/rails.png"
conference.venue = create(:venue)
sign_in organizer
visit admin_conference_lodgings_path(
conference_id: conference.short_title)
@ -16,7 +15,6 @@ feature Lodging do
click_link 'Add Lodging'
fill_in 'lodging_name', with: 'New lodging'
fill_in 'lodging_description', with: 'This is the lodging description'
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
attach_file 'Photo', path
@ -25,17 +23,13 @@ feature Lodging do
# Validations
expect(flash).to eq('Lodging successfully created.')
expect(page.has_content?('New lodging')).to be true
expect(page.has_content?('This is the lodging description')).to be true
expect(page.has_content?('Go to Website')).to be true
expect(Lodging.count).to eq(1)
end
scenario 'Update a lodging', feature: true, js: true do
path = "#{Rails.root}/app/assets/images/rails.png"
venue = create(:venue)
lodging = create(:lodging, venue: conference.venue)
conference.venue = venue
lodging = create(:lodging, conference: conference)
sign_in organizer
visit admin_conference_lodgings_path(
@ -48,7 +42,6 @@ feature Lodging do
click_link 'Edit'
fill_in 'lodging_name', with: 'New lodging'
fill_in 'lodging_description', with: 'This is the lodging description'
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
attach_file 'Photo', path
@ -57,19 +50,15 @@ feature Lodging do
# Validations
expect(flash).to eq('Lodging successfully updated.')
expect(page.has_content?('New lodging')).to be true
expect(page.has_content?('This is the lodging description')).to be true
expect(page.has_content?('Go to Website')).to be true
lodging.reload
expect(lodging.name).to eq('New lodging')
expect(lodging.description).to eq('This is the lodging description')
expect(lodging.description).to eq('Lorem Ipsum Dolor')
expect(lodging.website_link).to eq('http:\\www.google.com')
expect(Lodging.count).to eq(1)
end
scenario 'Delete a lodging', feature: true, js: true do
venue = create(:venue)
create(:lodging, venue: conference.venue)
conference.venue = venue
conference.lodgings << create(:lodging)
sign_in organizer
visit admin_conference_lodgings_path(

View file

@ -17,8 +17,6 @@ feature Splashpage do
expect(flash).to eq('Splashpage successfully created.')
expect(current_path).to eq(admin_conference_splashpage_path(conference.short_title))
splashpage = Splashpage.find_by(conference_id: conference.id)
end
context 'splashpage already created' do

View file

@ -17,8 +17,10 @@ feature Conference do
text).to eq('Update Venue')
fill_in 'venue_name', with: 'Example University'
fill_in 'venue_address', with: 'Example Street 42 \n' +
'12345 Example City \n Germany'
fill_in 'venue_street', with: 'Example Street 42'
fill_in 'venue_city', with: 'Example City'
fill_in 'venue_postalcode', with: '12345'
select 'Germany', from: 'venue_country'
fill_in 'venue_website', with: 'www.example.com'
fill_in 'venue_description',
with: 'Lorem ipsum dolor sit amet, consetetur' \
@ -31,15 +33,13 @@ feature Conference do
venue = Conference.find(conference.id).venue
expect(venue.name).to eq('Example University')
expect(venue.address).to eq('Example Street 42 \n' \
'12345 Example City \n Germany')
expect(venue.street).to eq('Example Street 42')
expect(venue.website).to eq('www.example.com')
expect(venue.description).to eq('Lorem ipsum dolor sit amet, consetetur' \
'sadipscing elitr, sed diam nonumy eirmod tempor')
click_link 'Edit Venue'
fill_in 'venue_name', with: 'Example University new'
fill_in 'venue_address', with: 'Example Street 42 \n ' \
'12345 Example City \n Germany new'
fill_in 'venue_website', with: 'www.example.com new'
fill_in 'venue_description',
with: 'new'
@ -50,8 +50,6 @@ feature Conference do
venue.reload
expect(venue.name).to eq('Example University new')
expect(venue.address).to eq('Example Street 42 \n ' \
'12345 Example City \n Germany new')
expect(venue.website).to eq('www.example.com new')
expect(venue.description).to eq('new')
end