FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tip4commit/features/tip_modifier_interface.feature at master · tip4commit/tip4commit · GitHub
tip4commit
tip4commit
Repository navigation
Code
Issues
54
(54)
Pull requests
13
(13)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
tip4commit
/
features
/
tip_modifier_interface.feature
Copy path
More file actions
More file actions
Latest commit
History
History
History
168 lines (152 loc) · 8.02 KB
Breadcrumbs
tip4commit
/
features
/
tip_modifier_interface.feature
Copy path
File metadata and controls
168 lines (152 loc) · 8.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
Feature
:
A project collaborator can change the tips of commits
Background
:
Given
a
"github"
project named
"seldon/seldons-project"
exists
And
the project collaborators are:
|
seldon
|
|
daneel
|
And
a developer named
"yugo"
exists with a bitcoin address
And
a developer named
"gaal"
exists without a bitcoin address
And
our fee is
"0"
And
a deposit of
"500"
is made
And
the most recent commit is
"AAA"
And
a new commit
"BBB"
is made with parent
"AAA"
And
a new commit
"CCC"
is made with parent
"BBB"
And
the author of commit
"BBB"
is
"yugo"
And
the author of commit
"CCC"
is
"gaal"
Scenario
:
Without anything modified
When
the project syncs with the remote repo
Then
there should be a tip of
"5"
for commit
"BBB"
And
there should be a tip of
"4.95"
for commit
"CCC"
And
there should be 0 email sent
Scenario
:
A collaborator wants to alter the tips
Given
I'm signed in as
"seldon"
When
the project syncs with the remote repo
And
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
When
I click
"Change project settings"
Then
I should be on the
"seldon/seldons-project github-project edit"
page
When
I check
"Do not send the tips immediately. Give collaborators the ability to modify the tips before they're sent"
And
I click
"Save the project settings"
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I should see
"The project settings have been updated"
When
a new commit
"DDD"
is made with parent
"CCC"
And
the author of commit
"DDD"
is
"yugo"
And
the message of commit
"DDD"
is
"yugo's trivial commit DDD"
And
a new commit
"EEE"
is made with parent
"DDD"
And
the author of commit
"EEE"
is
"gaal"
And
the message of commit
"EEE"
is
"gaal's tiny commit EEE"
When
a new commit
"FFF"
is made with parent
"EEE"
And
the author of commit
"FFF"
is
"newguy"
And
the message of commit
"FFF"
is
"newguy's unrewarded commit EEE"
When
the project syncs with the remote repo
Then
there should be a tip of
"5"
for commit
"BBB"
And
there should be a tip of
"4.95"
for commit
"CCC"
And
the tip amount for commit
"DDD"
should be undecided
And
the tip amount for commit
"EEE"
should be undecided
But
there should be no tip for commit
"FFF"
And
there should be 0 email sent
When
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
When
I click
"Decide tip amounts"
Then
I should be on the
"seldon/seldons-project github-project decide_tip_amounts"
page
And
I should not see
"AAA"
And
I should not see
"BBB"
And
I should not see
"CCC"
But
I should see
"DDD"
And
I should see
"yugo's trivial commit DDD"
And
I should see
"EEE"
And
I should see
"gaal's tiny commit EEE"
But
I should not see
"FFF"
And
I should not see
"newguy's unrewarded commit FFF"
And
the most recent commit should be
"FFF"
When
I choose the amount
"Free: 0%"
on commit
"DDD"
And
I click
"Send the selected tip amounts"
Then
I should be on the
"seldon/seldons-project github-project decide_tip_amounts"
page
And
I should see
"The tip amounts have been defined"
And
there should be a tip of
"0"
for commit
"DDD"
And
the tip amount for commit
"EEE"
should be undecided
But
there should be no tip for commit
"FFF"
And
there should be 0 email sent
When
the email counters are reset
And
I choose the amount
"Tiny: 0.1%"
on commit
"EEE"
And
I click
"Send the selected tip amounts"
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I should see
"The tip amounts have been defined"
And
there should be a tip of
"0"
for commit
"DDD"
And
there should be a tip of
"0.49005"
for commit
"EEE"
But
there should be no tip for commit
"FFF"
And
there should be 0 email sent
Scenario
:
A non collaborator does not see the settings button
Given
I'm signed in as
"yugo"
And
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I should not see
"Change project settings"
Scenario
:
A non collaborator does not see the decide tip amounts button
Given
the project has undedided tips
And
I'm signed in as
"yugo"
And
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I should not see
"Decide tip amounts"
Scenario
:
A non collaborator goes to the edit page of a project
Given
I'm signed in as
"yugo"
When
I visit the
"seldon/seldons-project github-project edit"
page
Then
I should be on the
"home"
page
And
I should see
"You are not authorized to perform this action!"
Scenario
:
A non collaborator sends a forged update on a project
Given
I'm signed in as
"yugo"
When
I send a forged request to enable tip holding on the project
Then
I should be on the
"home"
page
And
I should see
"You are not authorized to perform this action!"
And
the project should not hold tips
Scenario
:
A collaborator sends a forged update on a project
Given
I'm signed in as
"daneel"
When
the project syncs with the remote repo
When
I send a forged request to enable tip holding on the project
Then
I should be on the
"seldon/seldons-project github-project"
page
And
the project should hold tips
Scenario Outline
:
A user sends a forged request to set a tip amount
When
the project syncs with the remote repo
Given
the project has 1 undecided tip
When
I'm signed in as
"<user>"
And
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I send a forged request to set the amount of the first undecided tip of the project
And
the project should have
<remaining undecided tips>
undecided tips
Examples
:
|
user
|
remaining
undecided
tips
|
|
seldon
|
0
|
|
yugo
|
1
|
Scenario
:
A collaborator sends large amounts in tips
Given
20 new commits are made by a developer named
"yugo"
And
a new commit
"last"
is made
And
the project holds tips
When
the project syncs with the remote repo
And
I'm signed in as
"seldon"
And
I visit the
"seldon/seldons-project github-project"
page
Then
I should be on the
"seldon/seldons-project github-project"
page
And
I should see
"Decide tip amounts"
When
I click
"Decide tip amounts"
Then
I should be on the
"seldon/seldons-project github-project decide_tip_amounts"
page
When
I choose the amount
"Huge: 5%"
on all commits
And
I click
"Send the selected tip amounts"
Then
I should be on the
"seldon/seldons-project github-project decide_tip_amounts"
page
And
I should see
"You can't assign more than 100% of available funds."
And
the tip amount for commit
"BBB"
should be undecided
And
the tip amount for commit
"CCC"
should be undecided
Scenario Outline
:
A collaborator changes the amount of a tip on another project
Given
the project holds tips
And
the project syncs with the remote repo
And
a
"github"
project named
"fake/fake"
exists
And
the project collaborators are:
|
bad
-
guy
|
And
a new commit
"fake commit"
is made
And
the project holds tips
When
the project syncs with the remote repo
And
I'm signed in as
"<user>"
When
regarding the
"github"
project named
"seldon/seldons-project"
And
I send a forged request to change the percentage of commit
"BBB"
to
"5"
Then
<consequences>
Examples
:
|
user
|
consequences
|
|
seldon
|
there
should
be
a
tip
of
"
25
"
for
commit
"
BBB
" |
|
bad
-
guy
|
the
tip
amount
for
commit
"
BBB
"
should
be
undecided
|
Back
|
FazBrowse Home
|
New Git URL