* VRFS-710 tests
This commit is contained in:
parent
eb079464ab
commit
a0a90a0eeb
|
|
@ -95,7 +95,7 @@ end
|
|||
gem 'rack-test'
|
||||
# gem 'rb-fsevent', '0.9.1', :require => false
|
||||
# gem 'growl', '1.0.3'
|
||||
gem 'poltergeist' , '1.3.0' # can't go to 1.4.0 until this is fixed https://github.com/jonleighton/poltergeist/issues/385
|
||||
gem 'poltergeist' , '1.4.1' # can't go to 1.4.0 until this is fixed https://github.com/jonleighton/poltergeist/issues/385
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -293,15 +293,15 @@
|
|||
friendSelectorDialog.showDialog(selectedFriendIds);
|
||||
});
|
||||
|
||||
$('#btn-email-invitation').click(function() {
|
||||
$('.btn-email-invitation').click(function() {
|
||||
invitationDialog.showEmailDialog();
|
||||
});
|
||||
|
||||
$('#btn-gmail-invitation').click(function() {
|
||||
$('div[layout-id="createSession"] .btn-gmail-invitation').click(function() {
|
||||
invitationDialog.showGoogleDialog();
|
||||
});
|
||||
|
||||
$('#btn-facebook-invitation').click(function() {
|
||||
$('div[layout-id="createSession"] .btn-facebook-invitation').click(function() {
|
||||
invitationDialog.showFacebookDialog();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
<div style="width:78%">
|
||||
<div class="left mr20">
|
||||
<div class="left" layout-link="inviteUsers">
|
||||
<a id="btn-email-invitation">
|
||||
<a class="btn-email-invitation">
|
||||
<%= image_tag("content/icon_gmail.png", :size => "24x24", :align => "absmiddle") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
</div> -->
|
||||
<div class="left left">
|
||||
<div class="left" layout-link="inviteUsers">
|
||||
<a id="btn-gmail-invitation">
|
||||
<a class="btn-gmail-invitation">
|
||||
<%= image_tag("content/icon_google.png", :size => "24x24", :align => "absmiddle") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
<div class="invitation-button-holder">
|
||||
<div class="left mr20">
|
||||
<div class="left" layout-link="inviteUsers">
|
||||
<a id="btn-email-invitation">
|
||||
<a class="btn-email-invitation">
|
||||
<%= image_tag("content/icon_gmail.png", :size => "24x24", :align => "absmiddle") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
<div class="left left">
|
||||
<div class="left" layout-link="inviteUsers">
|
||||
<a id="btn-gmail-invitation">
|
||||
<a class="btn-gmail-invitation">
|
||||
<%= image_tag("content/icon_google.png", :size => "24x24", :align => "absmiddle") %>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Profile Menu", :js => true, :type => :feature, :capybara_feature => true do
|
||||
|
||||
subject { page }
|
||||
|
||||
before(:all) do
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
Capybara.current_driver = Capybara.javascript_driver
|
||||
Capybara.default_wait_time = 10
|
||||
end
|
||||
|
||||
|
||||
let(:user) { FactoryGirl.create(:user) }
|
||||
|
||||
before(:each) do
|
||||
UserMailer.deliveries.clear
|
||||
sign_in_poltergeist user
|
||||
visit "/"
|
||||
find('h2', text: 'musicians')
|
||||
# open menu
|
||||
find('.userinfo').trigger(:click)
|
||||
end
|
||||
|
||||
describe "Account Home link" do
|
||||
|
||||
before(:each) do
|
||||
click_link 'Account Home'
|
||||
end
|
||||
|
||||
it { should have_selector('h1', text: 'my account') }
|
||||
end
|
||||
|
||||
describe "Identity link" do
|
||||
|
||||
before(:each) do
|
||||
click_link 'Identity'
|
||||
end
|
||||
|
||||
it { should have_selector('h2', text: 'identity:') }
|
||||
end
|
||||
|
||||
describe "Profile link" do
|
||||
|
||||
before(:each) do
|
||||
click_link 'Profile'
|
||||
end
|
||||
|
||||
it { should have_selector('h2', text: 'profile:') }
|
||||
end
|
||||
|
||||
|
||||
describe "Audio Gear link" do
|
||||
|
||||
before(:each) do
|
||||
click_link 'Audio Gear'
|
||||
end
|
||||
|
||||
it { should have_selector('h2', text: 'audio profiles:') }
|
||||
end
|
||||
|
||||
describe "Download App link" do
|
||||
|
||||
before(:each) do
|
||||
click_link 'Download App'
|
||||
end
|
||||
|
||||
it {
|
||||
# the download app link opens a new window
|
||||
page.driver.window_handles.last
|
||||
page.within_window page.driver.window_handles.last do
|
||||
should have_selector('h1', text: 'Downloads')
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
describe "invite submenu" do
|
||||
before(:each) do
|
||||
click_link "Invite Friends"
|
||||
end
|
||||
|
||||
describe "Email" do
|
||||
before(:each) do
|
||||
click_link "Email"
|
||||
end
|
||||
|
||||
it {should have_selector('label', text: 'Enter email address(es). If multiple addresses, separate with commas.')}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Profile Menu", :js => true, :type => :feature, :capybara_feature => true do
|
||||
|
||||
subject { page }
|
||||
|
||||
before(:all) do
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
Capybara.current_driver = Capybara.javascript_driver
|
||||
Capybara.default_wait_time = 10
|
||||
end
|
||||
|
||||
let(:user) { FactoryGirl.create(:user) }
|
||||
|
||||
before(:each) do
|
||||
UserMailer.deliveries.clear
|
||||
sign_in_poltergeist user
|
||||
visit "/"
|
||||
find('h2', text: 'musicians')
|
||||
end
|
||||
|
||||
describe "Invite more Users" do
|
||||
|
||||
before(:each) do
|
||||
find('.sidebar .invite-friend-row').hover
|
||||
find('.sidebar .invitation-button-holder')
|
||||
end
|
||||
|
||||
it { should have_selector('.friend-name', text: 'Invite More Friends') }
|
||||
|
||||
describe "try to invite" do
|
||||
before(:each) do
|
||||
find('.sidebar .btn-email-invitation').trigger(:click)
|
||||
end
|
||||
it {should have_selector('label', text: 'Enter email address(es). If multiple addresses, separate with commas.')}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
Loading…
Reference in New Issue