Commit 080bd12e167dceb3274bb488b7be787379d126b4
1 parent
7aeb92b8
Exists in
master
and in
4 other branches
rewrite project commits features using spinach
Showing
43 changed files
with
512 additions
and
354 deletions
Show diff stats
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +Feature: Project Browse branches | ||
2 | + Background: | ||
3 | + Given I sign in as a user | ||
4 | + And I own project "Shop" | ||
5 | + And project "Shop" has protected branches | ||
6 | + Given I visit project branches page | ||
7 | + | ||
8 | + Scenario: I can see project recent git branches | ||
9 | + Then I should see "Shop" recent branches list | ||
10 | + | ||
11 | + Scenario: I can see project all git branches | ||
12 | + Given I click link "All" | ||
13 | + Then I should see "Shop" all branches list | ||
14 | + | ||
15 | + Scenario: I can see project protected git branches | ||
16 | + Given I click link "Protected" | ||
17 | + Then I should see "Shop" protected branches list | ||
18 | + | ||
19 | + # @wip | ||
20 | + # Scenario: I can download project by branch | ||
21 | + | ||
22 | + # @wip | ||
23 | + # Scenario: I can view protected branches | ||
24 | + | ||
25 | + # @wip | ||
26 | + # Scenario: I can manage protected branches |
@@ -0,0 +1,10 @@ | @@ -0,0 +1,10 @@ | ||
1 | +Feature: Project Comment commit | ||
2 | + Background: | ||
3 | + Given I sign in as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project commit page | ||
6 | + | ||
7 | + @javascript | ||
8 | + Scenario: I comment commit | ||
9 | + Given I leave a comment like "XML attached" | ||
10 | + Then I should see comment "XML attached" |
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +Feature: Project Browse commits | ||
2 | + Background: | ||
3 | + Given I sign in as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project commits page | ||
6 | + | ||
7 | + Scenario: I browse commits list for master branch | ||
8 | + Then I see project commits | ||
9 | + | ||
10 | + Scenario: I browse atom feed of commits list for master branch | ||
11 | + Given I click atom feed link | ||
12 | + Then I see commits atom feed | ||
13 | + | ||
14 | + Scenario: I browse commit from list | ||
15 | + Given I click on commit link | ||
16 | + Then I see commit info | ||
17 | + | ||
18 | + Scenario: I compare refs | ||
19 | + Given I visit compare refs page | ||
20 | + And I fill compare fields with refs | ||
21 | + And I see compared refs |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +Feature: Project Browse tags | ||
2 | + Background: | ||
3 | + Given I sign in as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project tags page | ||
6 | + | ||
7 | + Scenario: I can see all git tags | ||
8 | + Then I should see "Shop" all tags list | ||
9 | + | ||
10 | + # @wip | ||
11 | + # Scenario: I can download project by tag |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +Feature: Create Project | ||
2 | + In order to get access to project sections | ||
3 | + A user with ability to create a project | ||
4 | + Should be able to create a new one | ||
5 | + | ||
6 | + Scenario: User create a project | ||
7 | + Given I signin as a user | ||
8 | + When I visit new project page | ||
9 | + And fill project form with valid data | ||
10 | + Then I should see project page | ||
11 | + And I should see empty project instuctions |
@@ -0,0 +1,82 @@ | @@ -0,0 +1,82 @@ | ||
1 | +Feature: Issues | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + And project "Shop" have "Release 0.4" open issue | ||
6 | + And project "Shop" have "Release 0.3" closed issue | ||
7 | + And I visit project "Shop" issues page | ||
8 | + | ||
9 | + Scenario: I should see open issues | ||
10 | + Given I should see "Release 0.4" in issues | ||
11 | + And I should not see "Release 0.3" in issues | ||
12 | + | ||
13 | + Scenario: I should see closed issues | ||
14 | + Given I click link "Closed" | ||
15 | + Then I should see "Release 0.3" in issues | ||
16 | + And I should not see "Release 0.4" in issues | ||
17 | + | ||
18 | + Scenario: I should see all issues | ||
19 | + Given I click link "All" | ||
20 | + Then I should see "Release 0.3" in issues | ||
21 | + And I should see "Release 0.4" in issues | ||
22 | + | ||
23 | + Scenario: I visit issue page | ||
24 | + Given I click link "Release 0.4" | ||
25 | + Then I should see issue "Release 0.4" | ||
26 | + | ||
27 | + @javascript | ||
28 | + Scenario: I submit new unassigned issue | ||
29 | + Given I click link "New Issue" | ||
30 | + And I submit new issue "500 error on profile" | ||
31 | + Given I click link "500 error on profile" | ||
32 | + Then I should see issue "500 error on profile" | ||
33 | + | ||
34 | + @javascript | ||
35 | + Scenario: I comment issue | ||
36 | + Given I visit issue page "Release 0.4" | ||
37 | + And I leave a comment like "XML attached" | ||
38 | + Then I should see comment "XML attached" | ||
39 | + | ||
40 | + @javascript | ||
41 | + Scenario: I search issue | ||
42 | + Given I fill in issue search with "Release" | ||
43 | + Then I should see "Release 0.4" in issues | ||
44 | + And I should not see "Release 0.3" in issues | ||
45 | + | ||
46 | + @javascript | ||
47 | + Scenario: I search issue that not exist | ||
48 | + Given I fill in issue search with "Bug" | ||
49 | + Then I should not see "Release 0.4" in issues | ||
50 | + And I should not see "Release 0.3" in issues | ||
51 | + | ||
52 | + | ||
53 | + @javascript | ||
54 | + Scenario: I search all issues | ||
55 | + Given I click link "All" | ||
56 | + And I fill in issue search with "0.3" | ||
57 | + Then I should see "Release 0.3" in issues | ||
58 | + And I should not see "Release 0.4" in issues | ||
59 | + | ||
60 | + @javascript | ||
61 | + Scenario: I clear search | ||
62 | + Given I click link "All" | ||
63 | + And I fill in issue search with "Something" | ||
64 | + And I fill in issue search with "" | ||
65 | + Then I should see "Release 0.4" in issues | ||
66 | + And I should see "Release 0.3" in issues | ||
67 | + | ||
68 | + @javascript | ||
69 | + Scenario: I create Issue with pre-selected milestone | ||
70 | + Given project "Shop" has milestone "v2.2" | ||
71 | + And project "Shop" has milestone "v3.0" | ||
72 | + And I visit project "Shop" issues page | ||
73 | + When I select milestone "v3.0" | ||
74 | + And I click link "New Issue" | ||
75 | + Then I should see selected milestone with title "v3.0" | ||
76 | + | ||
77 | + @javascript | ||
78 | + Scenario: I create Issue with pre-selected assignee | ||
79 | + When I select first assignee from "Shop" project | ||
80 | + And I click link "New Issue" | ||
81 | + Then I should see first assignee from "Shop" as selected assignee | ||
82 | + |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +Feature: Labels | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + And project "Shop" have issues tags: | ||
6 | + | name | | ||
7 | + | bug | | ||
8 | + | feature | | ||
9 | + Given I visit project "Shop" labels page | ||
10 | + | ||
11 | + Scenario: I should see active milestones | ||
12 | + Then I should see label "bug" | ||
13 | + And I should see label "feature" |
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +Feature: Milestones | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + And project "Shop" has milestone "v2.2" | ||
6 | + Given I visit project "Shop" milestones page | ||
7 | + | ||
8 | + Scenario: I should see active milestones | ||
9 | + Then I should see milestone "v2.2" | ||
10 | + | ||
11 | + Scenario: I should see milestone | ||
12 | + Given I click link "v2.2" | ||
13 | + Then I should see milestone "v2.2" | ||
14 | + | ||
15 | + Scenario: I create new milestone | ||
16 | + Given I click link "New Milestone" | ||
17 | + And I submit new milestone "v2.3" | ||
18 | + Then I should see milestone "v2.3" |
@@ -0,0 +1,42 @@ | @@ -0,0 +1,42 @@ | ||
1 | +Feature: Merge Requests | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + And project "Shop" have "Bug NS-04" open merge request | ||
6 | + And project "Shop" have "Feature NS-03" closed merge request | ||
7 | + And I visit project "Shop" merge requests page | ||
8 | + | ||
9 | + Scenario: I should see open merge requests | ||
10 | + Then I should see "Bug NS-04" in merge requests | ||
11 | + And I should not see "Feature NS-03" in merge requests | ||
12 | + | ||
13 | + Scenario: I should see closed merge requests | ||
14 | + Given I click link "Closed" | ||
15 | + Then I should see "Feature NS-03" in merge requests | ||
16 | + And I should not see "Bug NS-04" in merge requests | ||
17 | + | ||
18 | + Scenario: I should see all merge requests | ||
19 | + Given I click link "All" | ||
20 | + Then I should see "Feature NS-03" in merge requests | ||
21 | + And I should see "Bug NS-04" in merge requests | ||
22 | + | ||
23 | + Scenario: I visit merge request page | ||
24 | + Given I click link "Bug NS-04" | ||
25 | + Then I should see merge request "Bug NS-04" | ||
26 | + | ||
27 | + Scenario: I close merge request page | ||
28 | + Given I click link "Bug NS-04" | ||
29 | + And I click link "Close" | ||
30 | + Then I should see closed merge request "Bug NS-04" | ||
31 | + | ||
32 | + Scenario: I submit new unassigned merge request | ||
33 | + Given I click link "New Merge Request" | ||
34 | + And I submit new merge request "Wiki Feature" | ||
35 | + Then I should see merge request "Wiki Feature" | ||
36 | + | ||
37 | + @javascript | ||
38 | + Scenario: I comment merge request | ||
39 | + Given I visit merge request page "Bug NS-04" | ||
40 | + And I leave a comment like "XML attached" | ||
41 | + Then I should see comment "XML attached" | ||
42 | + |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +Feature: Browse git repo | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project source page | ||
6 | + | ||
7 | + Scenario: I browse files from master branch | ||
8 | + Then I should see files from repository | ||
9 | + | ||
10 | + Scenario: I browse files for specific ref | ||
11 | + Given I visit project source page for "8470d70" | ||
12 | + Then I should see files from repository for "8470d70" | ||
13 | + | ||
14 | + Scenario: I browse file content | ||
15 | + Given I click on file from repo | ||
16 | + Then I should see it content | ||
17 | + | ||
18 | + Scenario: I browse raw file | ||
19 | + Given I visit blob file from repo | ||
20 | + And I click on raw button | ||
21 | + Then I should see raw file content | ||
22 | + | ||
23 | + |
@@ -0,0 +1,10 @@ | @@ -0,0 +1,10 @@ | ||
1 | +Feature: Browse git repo | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project source page | ||
6 | + | ||
7 | + Scenario: I blame file | ||
8 | + Given I click on file from repo | ||
9 | + And I click blame button | ||
10 | + Then I should see git file blame |
@@ -0,0 +1,35 @@ | @@ -0,0 +1,35 @@ | ||
1 | +Feature: Project Team management | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + And gitlab user "Mike" | ||
6 | + And gitlab user "Sam" | ||
7 | + And "Sam" is "Shop" developer | ||
8 | + And I visit project "Shop" team page | ||
9 | + | ||
10 | + Scenario: See all team members | ||
11 | + Then I should be able to see myself in team | ||
12 | + And I should see "Sam" in team list | ||
13 | + | ||
14 | + Scenario: Add user to project | ||
15 | + Given I click link "New Team Member" | ||
16 | + And I select "Mike" as "Reporter" | ||
17 | + Then I should see "Mike" in team list as "Reporter" | ||
18 | + | ||
19 | + @javascript | ||
20 | + Scenario: Update user access | ||
21 | + Given I should see "Sam" in team list as "Developer" | ||
22 | + And I change "Sam" role to "Reporter" | ||
23 | + Then I visit project "Shop" team page | ||
24 | + And I should see "Sam" in team list as "Reporter" | ||
25 | + | ||
26 | + Scenario: View team member profile | ||
27 | + Given I click link "Sam" | ||
28 | + Then I should see "Sam" team profile | ||
29 | + | ||
30 | + Scenario: Cancel team member | ||
31 | + Given I click link "Sam" | ||
32 | + And I click link "Remove from team" | ||
33 | + Then I visit project "Shop" team page | ||
34 | + And I should not see "Sam" in team list | ||
35 | + |
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | +@javascript | ||
2 | +Feature: Project Wall | ||
3 | + In order to use Project Wall | ||
4 | + A user | ||
5 | + Should be able to read & write messages | ||
6 | + | ||
7 | + Background: | ||
8 | + Given I signin as a user | ||
9 | + And I own project "Shop" | ||
10 | + And I visit project "Shop" wall page | ||
11 | + | ||
12 | + Scenario: Write comment | ||
13 | + Given I write new comment "my special test message" | ||
14 | + Then I should see project wall note "my special test message" | ||
15 | + | ||
16 | + Then I visit project "Shop" wall page | ||
17 | + And I should see project wall note "my special test message" |
@@ -0,0 +1,15 @@ | @@ -0,0 +1,15 @@ | ||
1 | +Feature: Wiki | ||
2 | + Background: | ||
3 | + Given I signin as a user | ||
4 | + And I own project "Shop" | ||
5 | + Given I visit project wiki page | ||
6 | + | ||
7 | + Scenario: Add new page | ||
8 | + Given I create Wiki page | ||
9 | + Then I should see newly created wiki page | ||
10 | + | ||
11 | + @javascript | ||
12 | + Scenario: I comment wiki page | ||
13 | + Given I create Wiki page | ||
14 | + And I leave a comment like "XML attached" | ||
15 | + Then I should see comment "XML attached" |
features/projects/commits/branches.feature
@@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
1 | -Feature: Browse branches | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And project "Shop" has protected branches | ||
6 | - Given I visit project branches page | ||
7 | - | ||
8 | - Scenario: I can see project recent git branches | ||
9 | - Then I should see "Shop" recent branches list | ||
10 | - | ||
11 | - Scenario: I can see project all git branches | ||
12 | - Given I click link "All" | ||
13 | - Then I should see "Shop" all branches list | ||
14 | - | ||
15 | - Scenario: I can see project protected git branches | ||
16 | - Given I click link "Protected" | ||
17 | - Then I should see "Shop" protected branches list | ||
18 | - | ||
19 | - Scenario: I can download project by branch | ||
20 | - | ||
21 | - Scenario: I can view protected branches | ||
22 | - | ||
23 | - Scenario: I can manage protected branches |
features/projects/commits/commit_comments.feature
@@ -1,10 +0,0 @@ | @@ -1,10 +0,0 @@ | ||
1 | -Feature: Comment commit | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project commit page | ||
6 | - | ||
7 | - @javascript | ||
8 | - Scenario: I comment commit | ||
9 | - Given I leave a comment like "XML attached" | ||
10 | - Then I should see comment "XML attached" |
features/projects/commits/commits.feature
@@ -1,22 +0,0 @@ | @@ -1,22 +0,0 @@ | ||
1 | -Feature: Browse commits | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project commits page | ||
6 | - | ||
7 | - Scenario: I browse commits list for master branch | ||
8 | - Then I see project commits | ||
9 | - | ||
10 | - Scenario: I browse atom feed of commits list for master branch | ||
11 | - Given I click atom feed link | ||
12 | - Then I see commits atom feed | ||
13 | - | ||
14 | - Scenario: I browse commit from list | ||
15 | - Given I click on commit link | ||
16 | - Then I see commit info | ||
17 | - | ||
18 | - Scenario: I compare refs | ||
19 | - Given I visit compare refs page | ||
20 | - And I fill compare fields with refs | ||
21 | - And I see compared refs | ||
22 | - |
features/projects/commits/tags.feature
@@ -1,10 +0,0 @@ | @@ -1,10 +0,0 @@ | ||
1 | -Feature: Browse tags | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project tags page | ||
6 | - | ||
7 | - Scenario: I can see all git tags | ||
8 | - Then I should see "Shop" all tags list | ||
9 | - | ||
10 | - Scenario: I can download project by tag |
features/projects/create_project.feature
@@ -1,11 +0,0 @@ | @@ -1,11 +0,0 @@ | ||
1 | -Feature: Create Project | ||
2 | - In order to get access to project sections | ||
3 | - A user with ability to create a project | ||
4 | - Should be able to create a new one | ||
5 | - | ||
6 | - Scenario: User create a project | ||
7 | - Given I signin as a user | ||
8 | - When I visit new project page | ||
9 | - And fill project form with valid data | ||
10 | - Then I should see project page | ||
11 | - And I should see empty project instuctions |
features/projects/deploy_keys.feature
features/projects/issues/issues.feature
@@ -1,82 +0,0 @@ | @@ -1,82 +0,0 @@ | ||
1 | -Feature: Issues | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And project "Shop" have "Release 0.4" open issue | ||
6 | - And project "Shop" have "Release 0.3" closed issue | ||
7 | - And I visit project "Shop" issues page | ||
8 | - | ||
9 | - Scenario: I should see open issues | ||
10 | - Given I should see "Release 0.4" in issues | ||
11 | - And I should not see "Release 0.3" in issues | ||
12 | - | ||
13 | - Scenario: I should see closed issues | ||
14 | - Given I click link "Closed" | ||
15 | - Then I should see "Release 0.3" in issues | ||
16 | - And I should not see "Release 0.4" in issues | ||
17 | - | ||
18 | - Scenario: I should see all issues | ||
19 | - Given I click link "All" | ||
20 | - Then I should see "Release 0.3" in issues | ||
21 | - And I should see "Release 0.4" in issues | ||
22 | - | ||
23 | - Scenario: I visit issue page | ||
24 | - Given I click link "Release 0.4" | ||
25 | - Then I should see issue "Release 0.4" | ||
26 | - | ||
27 | - @javascript | ||
28 | - Scenario: I submit new unassigned issue | ||
29 | - Given I click link "New Issue" | ||
30 | - And I submit new issue "500 error on profile" | ||
31 | - Given I click link "500 error on profile" | ||
32 | - Then I should see issue "500 error on profile" | ||
33 | - | ||
34 | - @javascript | ||
35 | - Scenario: I comment issue | ||
36 | - Given I visit issue page "Release 0.4" | ||
37 | - And I leave a comment like "XML attached" | ||
38 | - Then I should see comment "XML attached" | ||
39 | - | ||
40 | - @javascript | ||
41 | - Scenario: I search issue | ||
42 | - Given I fill in issue search with "Release" | ||
43 | - Then I should see "Release 0.4" in issues | ||
44 | - And I should not see "Release 0.3" in issues | ||
45 | - | ||
46 | - @javascript | ||
47 | - Scenario: I search issue that not exist | ||
48 | - Given I fill in issue search with "Bug" | ||
49 | - Then I should not see "Release 0.4" in issues | ||
50 | - And I should not see "Release 0.3" in issues | ||
51 | - | ||
52 | - | ||
53 | - @javascript | ||
54 | - Scenario: I search all issues | ||
55 | - Given I click link "All" | ||
56 | - And I fill in issue search with "0.3" | ||
57 | - Then I should see "Release 0.3" in issues | ||
58 | - And I should not see "Release 0.4" in issues | ||
59 | - | ||
60 | - @javascript | ||
61 | - Scenario: I clear search | ||
62 | - Given I click link "All" | ||
63 | - And I fill in issue search with "Something" | ||
64 | - And I fill in issue search with "" | ||
65 | - Then I should see "Release 0.4" in issues | ||
66 | - And I should see "Release 0.3" in issues | ||
67 | - | ||
68 | - @javascript | ||
69 | - Scenario: I create Issue with pre-selected milestone | ||
70 | - Given project "Shop" has milestone "v2.2" | ||
71 | - And project "Shop" has milestone "v3.0" | ||
72 | - And I visit project "Shop" issues page | ||
73 | - When I select milestone "v3.0" | ||
74 | - And I click link "New Issue" | ||
75 | - Then I should see selected milestone with title "v3.0" | ||
76 | - | ||
77 | - @javascript | ||
78 | - Scenario: I create Issue with pre-selected assignee | ||
79 | - When I select first assignee from "Shop" project | ||
80 | - And I click link "New Issue" | ||
81 | - Then I should see first assignee from "Shop" as selected assignee | ||
82 | - |
features/projects/issues/labels.feature
@@ -1,13 +0,0 @@ | @@ -1,13 +0,0 @@ | ||
1 | -Feature: Labels | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And project "Shop" have issues tags: | ||
6 | - | name | | ||
7 | - | bug | | ||
8 | - | feature | | ||
9 | - Given I visit project "Shop" labels page | ||
10 | - | ||
11 | - Scenario: I should see active milestones | ||
12 | - Then I should see label "bug" | ||
13 | - And I should see label "feature" |
features/projects/issues/milestones.feature
@@ -1,18 +0,0 @@ | @@ -1,18 +0,0 @@ | ||
1 | -Feature: Milestones | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And project "Shop" has milestone "v2.2" | ||
6 | - Given I visit project "Shop" milestones page | ||
7 | - | ||
8 | - Scenario: I should see active milestones | ||
9 | - Then I should see milestone "v2.2" | ||
10 | - | ||
11 | - Scenario: I should see milestone | ||
12 | - Given I click link "v2.2" | ||
13 | - Then I should see milestone "v2.2" | ||
14 | - | ||
15 | - Scenario: I create new milestone | ||
16 | - Given I click link "New Milestone" | ||
17 | - And I submit new milestone "v2.3" | ||
18 | - Then I should see milestone "v2.3" |
features/projects/merge_requests.feature
@@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
1 | -Feature: Merge Requests | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And project "Shop" have "Bug NS-04" open merge request | ||
6 | - And project "Shop" have "Feature NS-03" closed merge request | ||
7 | - And I visit project "Shop" merge requests page | ||
8 | - | ||
9 | - Scenario: I should see open merge requests | ||
10 | - Then I should see "Bug NS-04" in merge requests | ||
11 | - And I should not see "Feature NS-03" in merge requests | ||
12 | - | ||
13 | - Scenario: I should see closed merge requests | ||
14 | - Given I click link "Closed" | ||
15 | - Then I should see "Feature NS-03" in merge requests | ||
16 | - And I should not see "Bug NS-04" in merge requests | ||
17 | - | ||
18 | - Scenario: I should see all merge requests | ||
19 | - Given I click link "All" | ||
20 | - Then I should see "Feature NS-03" in merge requests | ||
21 | - And I should see "Bug NS-04" in merge requests | ||
22 | - | ||
23 | - Scenario: I visit merge request page | ||
24 | - Given I click link "Bug NS-04" | ||
25 | - Then I should see merge request "Bug NS-04" | ||
26 | - | ||
27 | - Scenario: I close merge request page | ||
28 | - Given I click link "Bug NS-04" | ||
29 | - And I click link "Close" | ||
30 | - Then I should see closed merge request "Bug NS-04" | ||
31 | - | ||
32 | - Scenario: I submit new unassigned merge request | ||
33 | - Given I click link "New Merge Request" | ||
34 | - And I submit new merge request "Wiki Feature" | ||
35 | - Then I should see merge request "Wiki Feature" | ||
36 | - | ||
37 | - @javascript | ||
38 | - Scenario: I comment merge request | ||
39 | - Given I visit merge request page "Bug NS-04" | ||
40 | - And I leave a comment like "XML attached" | ||
41 | - Then I should see comment "XML attached" | ||
42 | - |
features/projects/network.feature
features/projects/project.feature
features/projects/snippets.feature
features/projects/source/browse_files.feature
@@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
1 | -Feature: Browse git repo | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project source page | ||
6 | - | ||
7 | - Scenario: I browse files from master branch | ||
8 | - Then I should see files from repository | ||
9 | - | ||
10 | - Scenario: I browse files for specific ref | ||
11 | - Given I visit project source page for "8470d70" | ||
12 | - Then I should see files from repository for "8470d70" | ||
13 | - | ||
14 | - Scenario: I browse file content | ||
15 | - Given I click on file from repo | ||
16 | - Then I should see it content | ||
17 | - | ||
18 | - Scenario: I browse raw file | ||
19 | - Given I visit blob file from repo | ||
20 | - And I click on raw button | ||
21 | - Then I should see raw file content | ||
22 | - | ||
23 | - |
features/projects/source/git_blame.feature
@@ -1,10 +0,0 @@ | @@ -1,10 +0,0 @@ | ||
1 | -Feature: Browse git repo | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project source page | ||
6 | - | ||
7 | - Scenario: I blame file | ||
8 | - Given I click on file from repo | ||
9 | - And I click blame button | ||
10 | - Then I should see git file blame |
features/projects/team_management.feature
@@ -1,35 +0,0 @@ | @@ -1,35 +0,0 @@ | ||
1 | -Feature: Project Team management | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - And gitlab user "Mike" | ||
6 | - And gitlab user "Sam" | ||
7 | - And "Sam" is "Shop" developer | ||
8 | - And I visit project "Shop" team page | ||
9 | - | ||
10 | - Scenario: See all team members | ||
11 | - Then I should be able to see myself in team | ||
12 | - And I should see "Sam" in team list | ||
13 | - | ||
14 | - Scenario: Add user to project | ||
15 | - Given I click link "New Team Member" | ||
16 | - And I select "Mike" as "Reporter" | ||
17 | - Then I should see "Mike" in team list as "Reporter" | ||
18 | - | ||
19 | - @javascript | ||
20 | - Scenario: Update user access | ||
21 | - Given I should see "Sam" in team list as "Developer" | ||
22 | - And I change "Sam" role to "Reporter" | ||
23 | - Then I visit project "Shop" team page | ||
24 | - And I should see "Sam" in team list as "Reporter" | ||
25 | - | ||
26 | - Scenario: View team member profile | ||
27 | - Given I click link "Sam" | ||
28 | - Then I should see "Sam" team profile | ||
29 | - | ||
30 | - Scenario: Cancel team member | ||
31 | - Given I click link "Sam" | ||
32 | - And I click link "Remove from team" | ||
33 | - Then I visit project "Shop" team page | ||
34 | - And I should not see "Sam" in team list | ||
35 | - |
features/projects/wall.feature
@@ -1,17 +0,0 @@ | @@ -1,17 +0,0 @@ | ||
1 | -@javascript | ||
2 | -Feature: Project Wall | ||
3 | - In order to use Project Wall | ||
4 | - A user | ||
5 | - Should be able to read & write messages | ||
6 | - | ||
7 | - Background: | ||
8 | - Given I signin as a user | ||
9 | - And I own project "Shop" | ||
10 | - And I visit project "Shop" wall page | ||
11 | - | ||
12 | - Scenario: Write comment | ||
13 | - Given I write new comment "my special test message" | ||
14 | - Then I should see project wall note "my special test message" | ||
15 | - | ||
16 | - Then I visit project "Shop" wall page | ||
17 | - And I should see project wall note "my special test message" |
features/projects/web_hooks.feature
features/projects/wiki.feature
@@ -1,15 +0,0 @@ | @@ -1,15 +0,0 @@ | ||
1 | -Feature: Wiki | ||
2 | - Background: | ||
3 | - Given I signin as a user | ||
4 | - And I own project "Shop" | ||
5 | - Given I visit project wiki page | ||
6 | - | ||
7 | - Scenario: Add new page | ||
8 | - Given I create Wiki page | ||
9 | - Then I should see newly created wiki page | ||
10 | - | ||
11 | - @javascript | ||
12 | - Scenario: I comment wiki page | ||
13 | - Given I create Wiki page | ||
14 | - And I leave a comment like "XML attached" | ||
15 | - Then I should see comment "XML attached" |
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +class ProjectBrowseBranches < Spinach::FeatureSteps | ||
2 | + Then 'I should see "Shop" recent branches list' do | ||
3 | + page.should have_content "Branches" | ||
4 | + page.should have_content "master" | ||
5 | + end | ||
6 | + | ||
7 | + Given 'I click link "All"' do | ||
8 | + click_link "All" | ||
9 | + end | ||
10 | + | ||
11 | + Then 'I should see "Shop" all branches list' do | ||
12 | + page.should have_content "Branches" | ||
13 | + page.should have_content "master" | ||
14 | + end | ||
15 | + | ||
16 | + Given 'I click link "Protected"' do | ||
17 | + click_link "Protected" | ||
18 | + end | ||
19 | + | ||
20 | + Then 'I should see "Shop" protected branches list' do | ||
21 | + within "table" do | ||
22 | + page.should have_content "stable" | ||
23 | + page.should_not have_content "master" | ||
24 | + end | ||
25 | + end | ||
26 | + | ||
27 | + Given 'I sign in as a user' do | ||
28 | + login_as :user | ||
29 | + end | ||
30 | + | ||
31 | + And 'I own project "Shop"' do | ||
32 | + @project = Factory :project, :name => "Shop" | ||
33 | + @project.add_access(@user, :admin) | ||
34 | + end | ||
35 | + | ||
36 | + And 'project "Shop" has protected branches' do | ||
37 | + project = Project.find_by_name("Shop") | ||
38 | + project.protected_branches.create(:name => "stable") | ||
39 | + end | ||
40 | + | ||
41 | + Given 'I visit project branches page' do | ||
42 | + visit branches_project_repository_path(@project) | ||
43 | + end | ||
44 | +end |
@@ -0,0 +1,60 @@ | @@ -0,0 +1,60 @@ | ||
1 | +class ProjectBrowseCommits < Spinach::FeatureSteps | ||
2 | + Then 'I see project commits' do | ||
3 | + current_path.should == project_commits_path(@project) | ||
4 | + | ||
5 | + commit = @project.commit | ||
6 | + page.should have_content(@project.name) | ||
7 | + page.should have_content(commit.message) | ||
8 | + page.should have_content(commit.id.to_s[0..5]) | ||
9 | + end | ||
10 | + | ||
11 | + Given 'I click atom feed link' do | ||
12 | + click_link "Feed" | ||
13 | + end | ||
14 | + | ||
15 | + Then 'I see commits atom feed' do | ||
16 | + commit = CommitDecorator.decorate(@project.commit) | ||
17 | + page.response_headers['Content-Type'].should have_content("application/atom+xml") | ||
18 | + page.body.should have_selector("title", :text => "Recent commits to #{@project.name}") | ||
19 | + page.body.should have_selector("author email", :text => commit.author_email) | ||
20 | + page.body.should have_selector("entry summary", :text => commit.description) | ||
21 | + end | ||
22 | + | ||
23 | + Given 'I click on commit link' do | ||
24 | + visit project_commit_path(@project, ValidCommit::ID) | ||
25 | + end | ||
26 | + | ||
27 | + Then 'I see commit info' do | ||
28 | + page.should have_content ValidCommit::MESSAGE | ||
29 | + page.should have_content "Showing 1 changed file" | ||
30 | + end | ||
31 | + | ||
32 | + Given 'I visit compare refs page' do | ||
33 | + visit compare_project_commits_path(@project) | ||
34 | + end | ||
35 | + | ||
36 | + And 'I fill compare fields with refs' do | ||
37 | + fill_in "from", :with => "master" | ||
38 | + fill_in "to", :with => "stable" | ||
39 | + click_button "Compare" | ||
40 | + end | ||
41 | + | ||
42 | + And 'I see compared refs' do | ||
43 | + page.should have_content "Commits (27)" | ||
44 | + page.should have_content "Compare View" | ||
45 | + page.should have_content "Showing 73 changed files" | ||
46 | + end | ||
47 | + | ||
48 | + Given 'I sign in as a user' do | ||
49 | + login_as :user | ||
50 | + end | ||
51 | + | ||
52 | + And 'I own project "Shop"' do | ||
53 | + @project = Factory :project, :name => "Shop" | ||
54 | + @project.add_access(@user, :admin) | ||
55 | + end | ||
56 | + | ||
57 | + Given 'I visit project commits page' do | ||
58 | + visit project_commits_path(@project) | ||
59 | + end | ||
60 | +end |
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +class ProjectBrowseTags < Spinach::FeatureSteps | ||
2 | + Then 'I should see "Shop" all tags list' do | ||
3 | + page.should have_content "Tags" | ||
4 | + page.should have_content "v1.2.1" | ||
5 | + end | ||
6 | + | ||
7 | + Given 'I sign in as a user' do | ||
8 | + login_as :user | ||
9 | + end | ||
10 | + | ||
11 | + And 'I own project "Shop"' do | ||
12 | + @project = Factory :project, :name => "Shop" | ||
13 | + @project.add_access(@user, :admin) | ||
14 | + end | ||
15 | + | ||
16 | + Given 'I visit project tags page' do | ||
17 | + visit tags_project_repository_path(@project) | ||
18 | + end | ||
19 | +end |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +class ProjectCommentCommit < Spinach::FeatureSteps | ||
2 | + Given 'I leave a comment like "XML attached"' do | ||
3 | + fill_in "note_note", :with => "XML attached" | ||
4 | + click_button "Add Comment" | ||
5 | + end | ||
6 | + | ||
7 | + Then 'I should see comment "XML attached"' do | ||
8 | + page.should have_content "XML attached" | ||
9 | + end | ||
10 | + | ||
11 | + Given 'I sign in as a user' do | ||
12 | + login_as :user | ||
13 | + end | ||
14 | + | ||
15 | + And 'I own project "Shop"' do | ||
16 | + @project = Factory :project, :name => "Shop" | ||
17 | + @project.add_access(@user, :admin) | ||
18 | + end | ||
19 | + | ||
20 | + Given 'I visit project commit page' do | ||
21 | + visit project_commit_path(@project, ValidCommit::ID) | ||
22 | + end | ||
23 | +end |
features/support/env.rb
@@ -4,12 +4,21 @@ require './config/environment' | @@ -4,12 +4,21 @@ require './config/environment' | ||
4 | require 'rspec' | 4 | require 'rspec' |
5 | require 'database_cleaner' | 5 | require 'database_cleaner' |
6 | 6 | ||
7 | -%w(login_helpers stubbed_repository).each do |f| | 7 | +%w(gitolite_stub login_helpers stubbed_repository valid_commit).each do |f| |
8 | require Rails.root.join('spec', 'support', f) | 8 | require Rails.root.join('spec', 'support', f) |
9 | end | 9 | end |
10 | 10 | ||
11 | include LoginHelpers | 11 | include LoginHelpers |
12 | +include GitoliteStub | ||
12 | 13 | ||
13 | -DatabaseCleaner.strategy = :transaction | 14 | +WebMock.allow_net_connect! |
15 | + | ||
16 | +DatabaseCleaner.strategy = :truncation | ||
14 | Spinach.hooks.before_scenario { DatabaseCleaner.start } | 17 | Spinach.hooks.before_scenario { DatabaseCleaner.start } |
15 | Spinach.hooks.after_scenario { DatabaseCleaner.clean } | 18 | Spinach.hooks.after_scenario { DatabaseCleaner.clean } |
19 | + | ||
20 | +Spinach.hooks.before_run do | ||
21 | + RSpec::Mocks::setup self | ||
22 | + | ||
23 | + stub_gitolite! | ||
24 | +end |