Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-03-03 03:13:19 +0300
committerJacob Schatz <jschatz1@gmail.com>2016-03-03 03:13:19 +0300
commit1fa7671f44291f78131c0fa31f6d1ffcb3ff6bbc (patch)
tree046701638803deb21c1d9242ea98138e6344bb9b /features
parent89270f77ed1ee5d74bba39edbbd5757d43af2a78 (diff)
parentd4981e9b4a9a548725eedff98b93c7ff3596c437 (diff)
Merge branch 'improve-user-tabs' into 'master'
Add routes and actions for dynamic tab loading. Closes #13588 and #13584 See merge request !2961
Diffstat (limited to 'features')
-rw-r--r--features/steps/shared/user.rb16
-rw-r--r--features/user.feature13
2 files changed, 29 insertions, 0 deletions
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
diff --git a/features/user.feature b/features/user.feature
index 35eae842e77..e0cadba30a1 100644
--- a/features/user.feature
+++ b/features/user.feature
@@ -5,10 +5,12 @@ 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"
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"
@@ -16,28 +18,34 @@ 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"
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"
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
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"
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
+ 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"
@@ -45,19 +53,23 @@ 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"
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"
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
+ 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"
@@ -68,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