* fixing test; marking one as pending while i work on it

This commit is contained in:
Seth Call 2014-07-23 18:26:28 -05:00
parent b590548af5
commit 5833da2618
6 changed files with 25 additions and 25 deletions

View File

@ -49,9 +49,10 @@
createInvitations(updateSessionID);
});
}
rest.getMusicianInvites({ session_id: sessionId, sender: context.JK.currentUserId })
.done(function(response) {
$.ajax({
url: "/api/invitations",
data: { session_id: sessionId, sender: context.JK.currentUserId }
}).done(function(response) {
response.map(function(item) {
var dd = item['receiver'];
existingInvites.push(dd.id);
@ -163,14 +164,17 @@
invitedFriends.map(function(invite_id) {
if (!_inviteExists(invite_id)) {
callCount++;
rest.createMusicianInvite({
music_session: sessionId,
receiver: invite_id
})
.done(function(response) {
var invite = {
music_session: sessionId,
receiver: invite_id
};
$.ajax({
type: "POST",
url: "/api/invitations",
data: invite
}).done(function(response) {
callCount--;
})
.fail(app.ajaxError);
}).fail(app.ajaxError);
}
});
// TODO - this is the second time I've used this pattern.

View File

@ -18,8 +18,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
end
def navigate_band_setup login=user
sign_in_poltergeist(login) unless current_url != 'about:blank'
wait_until_curtain_gone
sign_in_poltergeist(login) if current_url == 'about:blank'
find('div.homecard.profile').trigger(:click)
find('#profile-bands-link').trigger(:click)
find('#band-setup-link').trigger(:click)
@ -166,8 +165,8 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
friend = user
friendship = FactoryGirl.create(:friendship, :user_id=>band_musician.id, :friend_id=>friend.id)
fast_signin(band_musician, "/client#/band/setup/#{band_musician.bands.first.id}")
sign_in_poltergeist(band_musician)
#visit "/client#/band/setup/#{band_musician.bands.first.id}"
band_name = "Just The Two Of Us"
band_bio = "Good, good friends"
band_website = "http://www.sounds.com/thetwoguysfrom2009.html"
@ -180,10 +179,8 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
expect(page).to have_selector("tr.selected[user-id='#{friend.id}']")
find('#btn-save-friends').trigger(:click)
find('#btn-band-setup-save').trigger(:click)
sleep 1 #ensure the transaction commits..
sleep 1 # ensure the transaction commits..
visit "/client#/bandProfile/#{band_musician.bands.first.id}"
wait_until_curtain_gone
find('#band-profile-members-link').trigger(:click)
within('#band-profile-members') do
expect(page).to have_selector('h2', text: 'Pending Band Invitations')

View File

@ -2,11 +2,8 @@ require 'spec_helper'
describe "Text Message", :js => true, :type => :feature, :capybara_feature => true do
before(:all) do
User.delete_all # we delete all users due to the use of find_musician() helper method, which scrolls through all users
end
before(:each) do
User.delete_all # we delete all users due to the use of find_musician() helper method, which scrolls through all users
@user1 = FactoryGirl.create(:user, last_jam_locidispid: 1)
@user2 = FactoryGirl.create(:user, last_jam_locidispid: 2, first_name: 'bone_crusher')
sign_in_poltergeist(@user1)
@ -25,9 +22,11 @@ describe "Text Message", :js => true, :type => :feature, :capybara_feature => tr
end
it "on find musician in musician's tile" do
pending "VRFS-1902"
JamRuby::Score.delete_all
JamRuby::Score.createx(1, 'a', 1, 2, 'b', 2, 10)
puts @user1.id
musician = find_musician(@user2)
find(".result-list-button-wrapper[data-musician-id='#{@user2.id}'] .search-m-message").trigger(:click)
find('h1', text: 'conversation with ' + @user2.name)

View File

@ -49,7 +49,6 @@ RecordedTrack.observers.disable :all # only a few tests want this observer activ
# a way to kill tests if they aren't running. capybara is hanging intermittently, I think
tests_started = false
Thread.new {
if ENV['BUILD_NUMBER']
sleep 240

View File

@ -33,11 +33,11 @@ def find_musician(user)
end
if Time.now - start > timeout
raise "unable to find musician #{user} within #{timeout} seconds"
raise "unable to find musician #{user.id} within #{timeout} seconds"
end
end
raise "unable to find musician #{user}"
raise "unable to find musician #{user.id}"
end
def initiate_text_dialog(user)

View File

@ -128,7 +128,8 @@ def sign_in_poltergeist(user, options = {})
page.should have_no_selector('.no-websocket-connection') if validate
end
# skip the typical login form, which redirects to /client (sloooow). Just sets the cookie, and puts you where you want to be
# skip the typical login form, which redirects to /client (slow due to extra login step).
# So this just sets the cookie, and puts you where you want to be
def fast_signin(user, url)
set_login_cookie(user)
visit url