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:
authorRémy Coutable <remy@rymai.me>2016-01-12 20:10:06 +0300
committerRémy Coutable <remy@rymai.me>2016-01-13 13:59:10 +0300
commit9d7f88c12258e27a189e8229090920db0627e88b (patch)
treebcfde81f33a6b506152f415d3ac337d57a840f3d /features/project
parentc4511a123401dcf9c2e1b3de732d18463fe9ba90 (diff)
Show referenced MRs & Issues only when the current viewer can access them
Diffstat (limited to 'features/project')
-rw-r--r--features/project/issues/references.feature31
1 files changed, 31 insertions, 0 deletions
diff --git a/features/project/issues/references.feature b/features/project/issues/references.feature
new file mode 100644
index 00000000000..bf7a4c6cb91
--- /dev/null
+++ b/features/project/issues/references.feature
@@ -0,0 +1,31 @@
+@project_issues
+Feature: Project Issues References
+ Background:
+ Given I sign in as "John Doe"
+ And "John Doe" owns public project "Community"
+ And project "Community" has "Public Issue 01" open issue
+ And I logout
+ And I sign in as "Mary Jane"
+ And "Mary Jane" owns private project "Private Library"
+ And project "Private Library" has "Fix NS-01" open merge request
+ And project "Private Library" has "Private Issue 01" open issue
+ And I visit merge request page "Fix NS-01"
+ And I leave a comment referencing issue "Public Issue 01" from "Fix NS-01" merge request
+ And I visit issue page "Private Issue 01"
+ And I leave a comment referencing issue "Public Issue 01" from "Private Issue 01" issue
+ And I logout
+
+ @javascript
+ Scenario: Viewing the public issue as a "John Doe"
+ Given I sign in as "John Doe"
+ When I visit issue page "Public Issue 01"
+ Then I should not see any related merge requests
+ And I should see no notes at all
+
+ @javascript
+ Scenario: Viewing the public issue as "Mary Jane"
+ Given I sign in as "Mary Jane"
+ When I visit issue page "Public Issue 01"
+ Then I should see the "Fix NS-01" related merge request
+ And I should see a note linking to "Fix NS-01" merge request
+ And I should see a note linking to "Private Issue 01" issue