* fixing more tests and slight style issues

This commit is contained in:
Seth Call 2015-07-17 11:52:46 -05:00
parent 40d5e2bc17
commit d8e712e85c
6 changed files with 21 additions and 17 deletions

View File

@ -404,9 +404,6 @@
rest.getBandMembers(bandId, false)
.done(function(response) {
bindMusicians(response, false);
if (isMember) {
bindPendingMembers();
}
})
.fail(function(xhr) {
if(xhr.status >= 500) {
@ -437,7 +434,15 @@
}
function bindMusicians(musicians, isPending) {
$('#band-profile-members').empty(); // for race conditions seen most often in testing
if (!isPending && isMember) {
bindPendingMembers();
}
if(!isPending) {
$('#band-profile-members').empty(); // for race conditions seen most often in testing
}
$.each(musicians, function(index, musician) {
var instrumentLogoHtml = '';
if ("instruments" in musician && musician.instruments != null) {

View File

@ -49,6 +49,10 @@
.playable {
display:block;
}
.band-actions {
margin-top:4px;
}
}
.profile-head {
@ -268,6 +272,7 @@
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing:border-box;
padding-top:1px;
.result-name {
font-size: 12px;

View File

@ -14,7 +14,7 @@
<div class="profile-header profile-head">
<h2 id="band-profile-name"></h2>
<div class="left">
<div class="left band-actions">
<a id="btn-edit-band-profile" class="button-orange">EDIT PROFILE</a>
<a id="btn-edit-band-members" class="button-orange">INVITE</a>
<a id="btn-edit-band-delete" class="button-orange">DELETE</a>

View File

@ -31,7 +31,7 @@ describe "User Progression", :js => true, :type => :feature, :capybara_feature
# put the user on Windows to start
detected_os = find("a.current-os-download")['data-platform']
if detected_os != "Win32"
find(".download-others a[data-platform='Win32']").trigger(:click)
find(".download-others a").trigger(:click)
end
end
@ -39,8 +39,9 @@ describe "User Progression", :js => true, :type => :feature, :capybara_feature
find(".download-others a[data-platform='MacOSX']").trigger(:click)
find("a.current-os-download")['data-platform'].should == "MacOSX"
find(".download-others a[data-platform='Win32']").trigger(:click)
find("a.current-os-download")['data-platform'].should == "Win32"
find(".download-others a").trigger(:click)
platform = find("a.current-os-download")['data-platform']
(platform == "Win32" || platform == "Linux").should be_true
end
end

View File

@ -135,10 +135,6 @@ describe "Feed", :js => true, :type => :feature, :capybara_feature => true do
before(:each) do
FactoryGirl.create(:claimed_recording, user: user, name: 'my recording', description: "my recording description")
#start_recording_with(user)
#stop_recording
#claim_recording("my recording", )
#formal_leave_by(user)
MusicSession.delete_all
end

View File

@ -91,10 +91,7 @@ describe "Profile History", :js => true, :type => :feature, :capybara_feature =>
describe "recordings" do
before(:each) do
start_recording_with(user)
stop_recording
claim_recording("my recording", "my recording description")
formal_leave_by(user)
FactoryGirl.create(:claimed_recording, user: user, name: 'my recording', description: "my recording description")
MusicSession.delete_all
end
@ -159,7 +156,7 @@ describe "Profile History", :js => true, :type => :feature, :capybara_feature =>
find("a.musician-name[user-id=\"#{user.id}\"][hoveraction=\"musician\"]", text: user.name)
# confirm instrument icons exist
find("img[instrument-id=\"electric guitar\"]")
find("img[instrument-id=\"acoustic guitar\"]")
# confirm hover bubbles show