From cc9f93f9d26a18a7e867384e1e3cf34a3197ba5c Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 24 Feb 2016 11:08:00 -0500 Subject: Add routes and actions for dynamic tab loading --- features/user.feature | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'features') diff --git a/features/user.feature b/features/user.feature index 35eae842e77..209afab4db7 100644 --- a/features/user.feature +++ b/features/user.feature @@ -5,6 +5,7 @@ Feature: User # Signed out + @javascript Scenario: I visit user "John Doe" page while not signed in when he owns a public project Given "John Doe" owns internal project "Internal" And "John Doe" owns public project "Community" @@ -16,6 +17,7 @@ Feature: User # Signed in as someone else + @javascript Scenario: I visit user "John Doe" page while signed in as someone else when he owns a public project Given "John Doe" owns public project "Community" And "John Doe" owns internal project "Internal" @@ -26,6 +28,7 @@ Feature: User And I should see project "Internal" And I should see project "Community" + @javascript Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a public project Given "John Doe" owns internal project "Internal" And I sign in as a user @@ -35,6 +38,7 @@ Feature: User And I should see project "Internal" And I should not see project "Community" + @javascript Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a project I can see Given I sign in as a user When I visit user "John Doe" page @@ -45,6 +49,7 @@ Feature: User # Signed in as the user himself + @javascript Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has a public project Given "John Doe" owns internal project "Internal" And "John Doe" owns public project "Community" @@ -55,6 +60,7 @@ Feature: User And I should see project "Internal" And I should see project "Community" + @javascript Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has no public project Given I sign in as "John Doe" When I visit user "John Doe" page -- cgit v1.2.3 From cb7dd09a9c85a35052b0776b84a7adf02695db8c Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Tue, 1 Mar 2016 17:42:39 -0500 Subject: Add click to tab steps --- features/steps/shared/user.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'features') diff --git a/features/steps/shared/user.rb b/features/steps/shared/user.rb index f0721094ee3..9856c510aa0 100644 --- a/features/steps/shared/user.rb +++ b/features/steps/shared/user.rb @@ -26,4 +26,20 @@ module SharedUser step 'I have no ssh keys' do @user.keys.delete_all end + + step 'I click on "Personal projects" tab' do + page.within '.nav-links' do + click_link 'Personal projects' + end + + expect(page).to have_css('.tab-content #projects.active') + end + + step 'I click on "Contributed projects" tab' do + page.within '.nav-links' do + click_link 'Contributed projects' + end + + expect(page).to have_css('.tab-content #contributed.active') + end end -- cgit v1.2.3 From 6bcfccf749caf083cb3c3955cd8d5e5e329d6e9b Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Tue, 1 Mar 2016 17:42:44 -0500 Subject: Fix specs --- features/user.feature | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'features') diff --git a/features/user.feature b/features/user.feature index 209afab4db7..e0cadba30a1 100644 --- a/features/user.feature +++ b/features/user.feature @@ -10,6 +10,7 @@ Feature: User Given "John Doe" owns internal project "Internal" And "John Doe" owns public project "Community" When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should not see project "Enterprise" And I should not see project "Internal" @@ -23,6 +24,7 @@ Feature: User And "John Doe" owns internal project "Internal" And I sign in as a user When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should not see project "Enterprise" And I should see project "Internal" @@ -33,6 +35,7 @@ Feature: User Given "John Doe" owns internal project "Internal" And I sign in as a user When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should not see project "Enterprise" And I should see project "Internal" @@ -42,6 +45,7 @@ Feature: User Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a project I can see Given I sign in as a user When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should not see project "Enterprise" And I should not see project "Internal" @@ -55,6 +59,7 @@ Feature: User And "John Doe" owns public project "Community" And I sign in as "John Doe" When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should see project "Enterprise" And I should see project "Internal" @@ -64,6 +69,7 @@ Feature: User Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has no public project Given I sign in as "John Doe" When I visit user "John Doe" page + And I click on "Personal projects" tab Then I should see user "John Doe" page And I should see project "Enterprise" And I should not see project "Internal" @@ -74,6 +80,7 @@ Feature: User Given I sign in as a user And "John Doe" has contributions When I visit user "John Doe" page + And I click on "Contributed projects" tab Then I should see user "John Doe" page And I should see contributed projects And I should see contributions calendar -- cgit v1.2.3