VRFS-3190 : Fix more band tests.
This commit is contained in:
parent
104a0c015a
commit
d37383a578
|
|
@ -49,6 +49,14 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
end
|
||||
|
||||
def complete_band_setup_form(band, biography, country="United States", region="Texas", city="Austin", params={})
|
||||
navigate_to_friend_page(band, biography, country, region, city, params)
|
||||
|
||||
# Save
|
||||
find('#btn-band-setup-next').trigger(:click)
|
||||
sleep(1)
|
||||
end
|
||||
|
||||
def navigate_to_friend_page(band, biography, country="United States", region="Texas", city="Austin", params={})
|
||||
fill_out_band_setup_form(band, biography, country, region, city, params)
|
||||
|
||||
find(:css, "#african").set(true)
|
||||
|
|
@ -59,11 +67,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
find('h2', text: 'set up band: online presence & performance samples')
|
||||
|
||||
find('#btn-band-setup-next').trigger(:click)
|
||||
find('h2', text: 'set up band: invite members')
|
||||
|
||||
# Save
|
||||
find('#btn-band-setup-next').trigger(:click)
|
||||
sleep(1)
|
||||
find('h2', text: 'set up band: invite members')
|
||||
end
|
||||
|
||||
context "band profile - new band setup" do
|
||||
|
|
@ -157,14 +161,18 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
name: 'Radical D00dz',
|
||||
biography: 'Just a bunch of EXTREME dudes who ROCK professionally!!',
|
||||
country: 'US',
|
||||
city: 'Lubbock',
|
||||
state: 'TX'
|
||||
state: 'TX',
|
||||
city: 'Lubbock'
|
||||
}
|
||||
|
||||
some_band = FactoryGirl.create(:band, band_attributes)
|
||||
sign_in_poltergeist fan
|
||||
view_band_profile_of some_band
|
||||
|
||||
|
||||
expect(page).to have_content 'Radical D00dz'
|
||||
expect(page).to have_content 'Just a bunch of EXTREME dudes who ROCK professionally!!'
|
||||
expect(page).to have_content 'Lubbock, TX'
|
||||
band_attributes.each_value { |v| expect(page).to have_content v }
|
||||
end
|
||||
|
||||
|
|
@ -200,7 +208,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
band_bio = "Good, good friends"
|
||||
band_website = "http://www.sounds.com/thetwoguysfrom2009.html"
|
||||
|
||||
fill_out_band_setup_form(band_name, band_bio)#, 'band-website' => band_website)
|
||||
navigate_to_friend_page(band_name, band_bio)#, 'band-website' => band_website)
|
||||
|
||||
#invite somebody using the picker
|
||||
find('#btn-choose-friends-band').trigger(:click)
|
||||
|
|
@ -254,7 +262,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
expect(page).to have_selector('#btn-edit-band-profile')
|
||||
|
||||
find('#btn-edit-band-profile').trigger(:click)
|
||||
find('h2', text: 'Step 1: General Information')
|
||||
find('h2', text: 'set up band: basics')
|
||||
|
||||
expect(page).to have_content band.name
|
||||
expect(page).to have_content band.biography
|
||||
|
|
|
|||
Loading…
Reference in New Issue