-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathpretty_paths.feature
More file actions
177 lines (139 loc) · 7.9 KB
/
pretty_paths.feature
File metadata and controls
177 lines (139 loc) · 7.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
Feature: The site routes pretty paths uniformly
Background:
Given a "github" project named "seldon/seldons-project" exists
And a developer named "seldon" exists with a bitcoin address
And a developer named "yugo" exists without a bitcoin address
### Project routes ###
Scenario: Project index page is accessible via standard path
When I visit the "projects" page
Then I should be on the "projects" page
Scenario: Project show page is accessible via project name
When I visit the "seldon/seldons-project github-project" page
Then I should be on the "seldon/seldons-project github-project" page
Scenario: Project show page is accessible via project id
When I browse to the explicit path "projects/1"
Then I should be on the "seldon/seldons-project github-project" page
Scenario: Project edit page is accessible via project name
Given I'm signed in as "seldon"
When the project syncs with the remote repo
And I visit the "seldon/seldons-project github-project edit" page
Then I should be on the "seldon/seldons-project github-project edit" page
Scenario: Project edit page is accessible via project id
Given I'm signed in as "seldon"
When the project syncs with the remote repo
And I browse to the explicit path "projects/1/edit"
Then I should be on the "seldon/seldons-project github-project edit" page
Scenario: Project decide_tip_amounts page is accessible via project name
Given I'm signed in as "seldon"
When the project syncs with the remote repo
When I visit the "seldon/seldons-project github-project decide_tip_amounts" page
Then I should be on the "seldon/seldons-project github-project decide_tip_amounts" page
Scenario: Project decide_tip_amounts page is accessible via project id
Given I'm signed in as "seldon"
When the project syncs with the remote repo
When I browse to the explicit path "projects/1/decide_tip_amounts"
Then I should be on the "seldon/seldons-project github-project decide_tip_amounts" page
Scenario: Project tips page is accessible via project name
When I visit the "seldon/seldons-project github-project tips" page
Then I should be on the "seldon/seldons-project github-project tips" page
Scenario: Project tips page is accessible via project id
When I browse to the explicit path "projects/1/tips"
Then I should be on the "seldon/seldons-project github-project tips" page
Scenario: Project deposits page is accessible via project name
When I visit the "seldon/seldons-project github-project deposits" page
Then I should be on the "seldon/seldons-project github-project deposits" page
Scenario: Project deposits page is accessible via project id
When I browse to the explicit path "projects/1/deposits"
Then I should be on the "seldon/seldons-project github-project deposits" page
Scenario: Unknown project show page via project name redirects to projects page
When I visit the "yugo/yugos-project github-project" page
Then I should be on the "projects" page
Scenario: Unknown project show page via project id redirects to projects page
When I browse to the explicit path "projects/999999"
Then I should be on the "projects" page
Scenario: Unknown project edit page via project name redirects to projects page
When I visit the "yugo/yugos-project github-project edit" page
Then I should be on the "projects" page
Scenario: Unknown project edit page via project id redirects to projects page
When I browse to the explicit path "projects/999999/edit"
Then I should be on the "projects" page
Scenario: Unknown project decide_tip_amounts page via project name redirects to projects page
When I visit the "yugo/yugos-project github-project decide_tip_amounts" page
Then I should be on the "projects" page
Scenario: Unknown project decide_tip_amounts page via project id redirects to projects page
When I browse to the explicit path "projects/999999/decide_tip_amounts"
Then I should be on the "projects" page
Scenario: Unknown project tips page via project name redirects to projects page
When I visit the "yugo/yugos-project github-project tips" page
Then I should be on the "projects" page
Scenario: Unknown project tips page via project id redirects to projects page
When I browse to the explicit path "projects/999999/tips"
Then I should be on the "projects" page
Scenario: Unknown project deposits page via project name redirects to projects page
When I visit the "yugo/yugos-project github-project deposits" page
Then I should be on the "projects" page
Scenario: Unknown project deposits page via project id redirects to projects page
When I browse to the explicit path "projects/999999/deposits"
Then I should be on the "projects" page
### User routes ###
Scenario: User index page is accessible via standard path
When I visit the "users" page
Then I should be on the "users" page
Scenario: User show page is inaccessible via user name when not signed in
When I visit the "seldon user" page
Then I should be on the "sign_in" page
And I should see "You need to sign in or sign up before continuing"
Scenario: User show page is inaccessible via user nickname when not signed in
When I browse to the explicit path "users/seldon"
Then I should be on the "sign_in" page
And I should see "You need to sign in or sign up before continuing"
Scenario: User show page is inaccessible via user name to other users
Given I'm signed in as "yugo"
When I visit the "seldon user" page
Then I should be on the "home" page
And I should see "You are not authorized to perform this action"
Scenario: User show page is inaccessible via nickname to other users
Given I'm signed in as "yugo"
When I browse to the explicit path "users/seldon"
Then I should be on the "home" page
And I should see "You are not authorized to perform this action"
@vcr
Scenario: User show page is accessible via user name to that user
Given I'm signed in as "seldon"
When I visit the "seldon user" page
Then I should be on the "seldon user" page
And I should see "seldon\nBalance\n0.00000000 Ƀ"
And I should see "E-mail\nseldon@example.com"
And I should see "Bitcoin address"
@vcr
Scenario: User show page is accessible via nickname to that user
Given I'm signed in as "seldon"
When I browse to the explicit path "users/seldon"
Then I should be on the "seldon user" page
And I should see "seldon\nBalance\n0.00000000 Ƀ"
And I should see "E-mail\nseldon@example.com"
And I should see "Bitcoin address"
Scenario: Unknown user tips page user name redirects to users page
When I visit the "unknown-user user tips" page
Then I should be on the "users" page
And I should see "User not found"
Scenario: Unknown user tips page pretty id redirects to users page
When I browse to the explicit path "users/999999/tips"
Then I should be on the "users" page
And I should see "User not found"
Scenario: User without bitcoin address tips page via user name redirects to users page
When I visit the "yugo user tips" page
Then I should be on the "users" page
And I should see "User not found"
Scenario: User without bitcoin address tips page via user id redirects to users page
When I browse to the explicit path "users/2/tips"
Then I should be on the "users" page
And I should see "User not found"
Scenario: User with bitcoin address tips page is accessible via user name
When I visit the "seldon user tips" page
Then I should be on the "seldon user tips" page
And I should see "seldon tips"
Scenario: User with bitcoin address tips page is accessible via user id
When I browse to the explicit path "users/1/tips"
Then I should be on the "seldon user tips" page
And I should see "seldon tips"