Fixed logout tests

This commit is contained in:
Phil Hughes 2016-06-27 14:31:19 +01:00
parent e7aa8315af
commit a44988ae4a
4 changed files with 9 additions and 6 deletions

View file

@ -48,7 +48,7 @@
= link_to "Profile", current_user
%li.divider
%li
= link_to "Sign out", destroy_user_session_path, method: :delete, title: 'Sign out'
= link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link", title: 'Sign out'
- else
%li
%div

View file

@ -219,8 +219,8 @@ Feature: Project Issues
When I click button "Unsubscribe"
Then I should see that I am unsubscribed
@javascript
Scenario: I submit new unassigned issue as guest
Given I logout
Given public project "Community"
When I visit project "Community" page
And I visit project "Community" issues page

View file

@ -73,13 +73,15 @@ Feature: Search
Scenario: I logout and should see project I am looking for
Given project "Shop" is public
And I logout
And I logout directly
And I visit dashboard search page
And I search for "Sho"
Then I should see "Shop" project link
Scenario: I logout and should see issues I am looking for
Given project "Shop" is public
And I logout
And I logout directly
And I visit dashboard search page
And project has issues
When I search for "Foo"
And I click "Issues" link
@ -88,7 +90,7 @@ Feature: Search
Scenario: I logout and should see project code I am looking for
Given project "Shop" is public
And I logout
And I logout directly
When I visit project "Shop" page
And I search for "rspec" on project page
Then I should see code results for project "Shop"

View file

@ -39,7 +39,8 @@ module LoginHelpers
# Requires Javascript driver.
def logout
find(:css, ".fa.fa-sign-out").click
find(".header-user-dropdown-toggle").click
click_link "Sign out"
end
# Logout without JavaScript driver