Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop

This commit is contained in:
Seth Call 2014-04-16 17:11:39 +00:00
commit 585385351d
3 changed files with 20 additions and 4 deletions

View File

@ -232,7 +232,7 @@
$('#band-profile-social').show();
$('.band-profile-nav a.active').removeClass('active');
$('.band-profile-nav a.#band-profile-social-link').addClass('active');
$('.band-profile-nav a#band-profile-social-link').addClass('active');
bindSocial();
}
@ -276,7 +276,7 @@
$('#band-profile-social').hide();
$('.band-profile-nav a.active').removeClass('active');
$('.band-profile-nav a.#band-profile-history-link').addClass('active');
$('.band-profile-nav a#band-profile-history-link').addClass('active');
bindHistory();
}
@ -295,7 +295,7 @@
$('#band-profile-social').hide();
$('.band-profile-nav a.active').removeClass('active');
$('.band-profile-nav a.#band-profile-members-link').addClass('active');
$('.band-profile-nav a#band-profile-members-link').addClass('active');
bindMembers();
}

View File

@ -24,6 +24,14 @@ FactoryGirl.define do
admin true
end
factory :band_musician do
after(:create) do |user|
band = FactoryGirl.create(:band)
user.bands << band
# user.band_musicians << BandMusician.create(:band_id => band.id, :user_id => user.id, :admin => true)
end
end
before(:create) do |user|
user.musician_instruments << FactoryGirl.build(:musician_instrument, user: user)
end

View File

@ -377,6 +377,7 @@ def change_session_genre #randomly just change it
here = 'select.genre-list'
#wait_for_ajax
find('#session-settings-button').trigger(:click)
find('#session-settings-dialog') # ensure the dialog is visible
within('#session-settings-dialog') do
wait_for_ajax
@new_genre = get_options(here).-(["Select Genre"]).-(selected_genres).sample.to_s
@ -417,11 +418,18 @@ end
def view_profile_of user
id = user.kind_of?(JamRuby::User) ? user.id : user
# assume some user signed in already (allows reuse in multi-user tests)
# assume some user signed in already
visit "/client#/profile/#{id}"
wait_until_curtain_gone
end
def view_band_profile_of band
id = band.kind_of?(JamRuby::Band) ? band.id :
band.kind_of?(JamRuby::BandMusician) ? band.bands.first.id : band
visit "/client#/bandProfile/#{id}"
wait_until_curtain_gone
end
def show_user_menu
page.execute_script("$('ul.shortcuts').show()")
#page.execute_script("JK.UserDropdown.menuHoverIn()")