* VRFS-1810 - bring back in_session_spec test, VRFS-1834 - allow different genres to be used by GenreSelectorHelpor
This commit is contained in:
parent
6e31e3b06c
commit
64b25e4b5f
|
|
@ -145,7 +145,7 @@
|
|||
}
|
||||
|
||||
function beforeShow(data) {
|
||||
context.JK.GenreSelectorHelper.render('#find-session-genre');
|
||||
context.JK.GenreSelectorHelper.render('#find-session-genre', 'Any Genre');
|
||||
}
|
||||
|
||||
function afterShow(data) {
|
||||
|
|
|
|||
|
|
@ -27,9 +27,12 @@
|
|||
});
|
||||
}
|
||||
|
||||
function render(parentSelector) {
|
||||
function render(parentSelector, notSelectedString) {
|
||||
if(!notSelectedString) {
|
||||
notSelectedString = 'Unspecified'
|
||||
}
|
||||
$('select', parentSelector).empty();
|
||||
$('select', parentSelector).append('<option value="">Unspecified</option>');
|
||||
$('select', parentSelector).append('<option value="">' + notSelectedString + '</option>');
|
||||
var template = $('#template-genre-option').html();
|
||||
$.each(_genres, function(index, value) {
|
||||
// value will be a dictionary entry from _genres:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr
|
|||
|
||||
|
||||
it "can't see a private session until it is made public", :slow => true do
|
||||
pending "Needs finalization of Find Session Screen"
|
||||
description = "Public or private, I cant decide!"
|
||||
create_session(creator: user, description: description)
|
||||
in_client(user) do
|
||||
|
|
@ -28,7 +27,7 @@ describe "In a Session", :js => true, :type => :feature, :capybara_feature => tr
|
|||
emulate_client
|
||||
sign_in_poltergeist finder
|
||||
visit "/client#/findSession"
|
||||
expect(page).to have_selector('#sessions-none-found') # verify private session is not found
|
||||
expect(page).to have_selector('#no-active-sessions') # verify private session is not found
|
||||
sign_out_poltergeist(validate: true)
|
||||
end
|
||||
in_client(user) do
|
||||
|
|
|
|||
|
|
@ -133,17 +133,22 @@ end
|
|||
def sign_out_poltergeist(options = {})
|
||||
open_user_dropdown
|
||||
click_link 'Sign Out'
|
||||
should_be_at_root if options[:validate]
|
||||
should_be_at_signin if options[:validate]
|
||||
end
|
||||
|
||||
def open_user_dropdown
|
||||
find('.userinfo').hover()
|
||||
end
|
||||
|
||||
|
||||
def should_be_at_root
|
||||
find('h1', text: 'Play music together over the Internet as if in the same room')
|
||||
end
|
||||
|
||||
def should_be_at_signin
|
||||
find('h1', text: 'sign in or register')
|
||||
end
|
||||
|
||||
def leave_music_session_sleep_delay
|
||||
# add a buffer to ensure WSG has enough time to expire
|
||||
sleep_dur = (Rails.application.config.websocket_gateway_connect_time_stale_browser +
|
||||
|
|
@ -438,7 +443,7 @@ end
|
|||
def set_session_as_private()
|
||||
find('#session-settings-button').trigger(:click)
|
||||
within('#session-settings-dialog') do
|
||||
jk_select("Private", '#session-settings-dialog #session-settings-musician-access')
|
||||
jk_select("Only RSVP musicians may join", '#session-settings-dialog #session-settings-musician-access')
|
||||
#select('Private', :from => 'session-settings-musician-access')
|
||||
find('#session-settings-dialog-submit').trigger(:click)
|
||||
end
|
||||
|
|
@ -449,7 +454,7 @@ end
|
|||
def set_session_as_public()
|
||||
find('#session-settings-button').trigger(:click)
|
||||
within('#session-settings-dialog') do
|
||||
jk_select("Public", '#session-settings-dialog #session-settings-musician-access')
|
||||
jk_select("Musicians may join at will", '#session-settings-dialog #session-settings-musician-access')
|
||||
# select('Public', :from => 'session-settings-musician-access')
|
||||
find('#session-settings-dialog-submit').trigger(:click)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue