|
|
@@ -0,0 +1,199 @@
|
|
1
|
+@avalanche_demo
|
|
2
|
+Feature: Avalanche Demo
|
|
3
|
+ In order to test avalanche
|
|
4
|
+ As an developer
|
|
5
|
+ I want a tour thru the system
|
|
6
|
+
|
|
7
|
+ Background:
|
|
8
|
+ Given the website is configured
|
|
9
|
+ And the following list of missions
|
|
10
|
+ | title | objective | briefing | status |
|
|
11
|
+ | Test 001 | 1 2 3 testing | Testing the website | 2 |
|
|
12
|
+ | Bank Robbery | Rob a bank and get rich | The target will be Fort Knox. Only expert agents allowed. | 2 |
|
|
13
|
+ And the the mission "Bank Robbery" has the following rewards
|
|
14
|
+ | title | description | img |
|
|
15
|
+ | 1M Dollars | You get 1.000.000,00 dollars | money.png |
|
|
16
|
+ | 200K Dollars | You get 200.000,00 dollars | money.png |
|
|
17
|
+ And the the mission "Bank Robbery" has the following agents
|
|
18
|
+ | role | objective | briefing | description |
|
|
19
|
+ | Mr. Pink | Get the inside the vault | Find the manager, make him open the vault and get all the money | |
|
|
20
|
+ | Mr. Blue | Take care of the hostages | Make sure the hostages dont try anything stupid. | |
|
|
21
|
+ | Mr. Green | Drive the gettaway car | Wait for the others to return and lose the cops. | |
|
|
22
|
+ And the agent "Mr. Pink" in the mission "Bank Robbery" has the following steps
|
|
23
|
+ | position | title | description | completed |
|
|
24
|
+ | 1 | Get to the bank | Make everbody surrender | false |
|
|
25
|
+ | 2 | Find the bank manager | Find the bank manager with the vault keys | false |
|
|
26
|
+ | 3 | Open the vault | Use the keys to open the vault | false |
|
|
27
|
+ | 4 | Get the money | Put all the money in the bag | false |
|
|
28
|
+ | 5 | Leave the bank | Exit the bank and get to the getaway car | false |
|
|
29
|
+ And the step "Get to the bank" from agent "Mr. Pink" in the mission "Bank Robbery" has the following validations
|
|
30
|
+ | validation_type | description |
|
|
31
|
+ | ValidationText | What time did you arrive? |
|
|
32
|
+ | ValidationText | How many hostages where there? |
|
|
33
|
+ And the step "Find the bank manager" from agent "Mr. Pink" in the mission "Bank Robbery" has the following validations
|
|
34
|
+ | validation_type | description |
|
|
35
|
+ | ValidationText | What is the bank manager's name? |
|
|
36
|
+ And the agent "Mr. Blue" in the mission "Bank Robbery" has the following steps
|
|
37
|
+ | position | title | description | completed |
|
|
38
|
+ | 1 | Get to the bank | Make everbody surrender | false |
|
|
39
|
+ | 2 | Secure the hostages | Secure the hostages while Mr. pink gets the vault | false |
|
|
40
|
+ | 3 | Leave the bank | Exit the bank and get to the getaway car | false |
|
|
41
|
+ And the agent "Mr. Green" in the mission "Bank Robbery" has the following steps
|
|
42
|
+ | position | title | description | completed |
|
|
43
|
+ | 1 | Get a good car for the job | Find a good car for the mission | false |
|
|
44
|
+ | 2 | Take everbody to the bank | Take Mr. Pink and Mr. Blue to the bank | false |
|
|
45
|
+ | 3 | Getaway | Wait for Mr. Pink and Mr. Blue to return and lose the cops | false |
|
|
46
|
+ And the agent "Mr. Pink" in the mission "Bank Robbery" has the reward "1M Dollars"
|
|
47
|
+ And the agent "Mr. Blue" in the mission "Bank Robbery" has the reward "1M Dollars"
|
|
48
|
+ And the agent "Mr. Green" in the mission "Bank Robbery" has the reward "200K Dollars"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+ @javascript
|
|
52
|
+ Scenario: Avalanche Tour
|
|
53
|
+ Given the user "Monty" "Cantsin" with email "monty_cantsin@canada.com" and password "12345678" exists
|
|
54
|
+ And I am not logged in
|
|
55
|
+ When I go to the homepage
|
|
56
|
+ Then I should see ""
|
|
57
|
+ And I wait for 1 seconds
|
|
58
|
+ And I go to the login page
|
|
59
|
+ Then I should see "Sign In"
|
|
60
|
+ And I log in with the email "monty_cantsin@canada.com" and password "12345678"
|
|
61
|
+ Then I should see "Signed in successfully"
|
|
62
|
+ And I should see "Monty Cantsin"
|
|
63
|
+ And I wait for 3 seconds
|
|
64
|
+ And I go to the missions page
|
|
65
|
+ And I wait for 3 seconds
|
|
66
|
+ And I click in the link "New Mission"
|
|
67
|
+ And I wait for 1 seconds
|
|
68
|
+ Then within "h1" I should see "Create Mission"
|
|
69
|
+ And I fill in "Mission Title" with "Treaure Hunt"
|
|
70
|
+ And I fill in "Mission Objective" with "Follow the steps to find the treasure."
|
|
71
|
+ And I fill in "Mission Briefing" with "Hello, welcome to the Treasure Hunt Mission!"
|
|
72
|
+ And I upload the file "cats_with_lasers.jpg" to the field "mission_cover_img"
|
|
73
|
+ And I fill in "mission_duration_number" with "5"
|
|
74
|
+ And I wait for 1 seconds
|
|
75
|
+ And I click in the button "Save & Continue"
|
|
76
|
+ And I wait for 2 seconds
|
|
77
|
+ Then within "h1" I should see "Rewards"
|
|
78
|
+ And I should see "No rewards"
|
|
79
|
+ And I click in the link "Add Reward"
|
|
80
|
+ Then within "h1" I should see "Add Reward"
|
|
81
|
+ And I fill in "Reward Title" with "Chocolate Bar"
|
|
82
|
+ And I fill in "Reward Description" with "A Delicious chocolate bar."
|
|
83
|
+ And I upload the file "chocolate_bar.png" to the field "reward_img"
|
|
84
|
+ And I click in the button "Save Reward"
|
|
85
|
+ And I wait for 2 seconds
|
|
86
|
+ Then within "h1" I should see "Rewards"
|
|
87
|
+ And I should see "Chocolate Bar"
|
|
88
|
+ And I click in the link "Next"
|
|
89
|
+ And I wait for 2 seconds
|
|
90
|
+ Then within "h1" I should see "Agents"
|
|
91
|
+ And I should see "No agents"
|
|
92
|
+ And I click in the link "Add Agent Role"
|
|
93
|
+ Then within "h1" I should see "Add Agent"
|
|
94
|
+ And I fill in "Agent Role" with "Treasure Hunter"
|
|
95
|
+ And I fill in "Objective" with "Follow the step to find the treasure."
|
|
96
|
+ And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
|
|
97
|
+ Then within the ".step_form" number "1" I click in the link "Step"
|
|
98
|
+ Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
|
|
99
|
+ And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
|
|
100
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
101
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
102
|
+ And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
|
|
103
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
104
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
105
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
106
|
+ And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
|
|
107
|
+ And I click in the link "Add a step"
|
|
108
|
+ Then within the ".step_form" number "2" I click in the link "Step"
|
|
109
|
+ And within the ".step_form" number "2" I fill in "Step Title" with "Get the first train"
|
|
110
|
+ And within the ".step_form" number "2" I fill in "Description" with "Take the first train towards the countryside"
|
|
111
|
+ And within the ".step_form" number "2" I click in the link "Add Validation"
|
|
112
|
+ And within the ".step_form" number "2" I click in the link "Text Validation"
|
|
113
|
+ And within the ".step-validation" number "3" I fill in "Validation description" with "What is the final destination?"
|
|
114
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
115
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
116
|
+ And within the ".step-validation" number "4" I fill in "Validation description" with "What is your ETA?"
|
|
117
|
+ And I click in the link "Add a step"
|
|
118
|
+ Then within the ".step_form" number "3" I click in the link "Step"
|
|
119
|
+ And within the ".step_form" number "3" I fill in "Step Title" with "Go to the last station"
|
|
120
|
+ And within the ".step_form" number "3" I fill in "Description" with "Stay in the train ultil it reaches the last station in the line. Get out of the train"
|
|
121
|
+ And I click in the link "Add a step"
|
|
122
|
+ Then within the ".step_form" number "4" I click in the link "Step"
|
|
123
|
+ And within the ".step_form" number "4" I fill in "Step Title" with "Wait for the pickup"
|
|
124
|
+ And within the ".step_form" number "4" I fill in "Description" with "Somebody is gonna come and take you to the next checkpoint"
|
|
125
|
+ And I wait for 2 seconds
|
|
126
|
+ And I click in the button "Save Agent"
|
|
127
|
+ And I wait for 1 seconds
|
|
128
|
+ And I click in the link "Add Agent Role"
|
|
129
|
+ Then within "h1" I should see "Add Agent"
|
|
130
|
+ And I fill in "Agent Role" with "Treasure Hunter"
|
|
131
|
+ And I fill in "Objective" with "Follow the step to find the treasure."
|
|
132
|
+ And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
|
|
133
|
+ Then within the ".step_form" number "1" I click in the link "Step"
|
|
134
|
+ Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
|
|
135
|
+ And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
|
|
136
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
137
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
138
|
+ And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
|
|
139
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
140
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
141
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
142
|
+ And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
|
|
143
|
+ And I wait for 1 seconds
|
|
144
|
+ And I click in the button "Save Agent"
|
|
145
|
+ And I wait for 1 seconds
|
|
146
|
+ And I click in the link "Add Agent Role"
|
|
147
|
+ Then within "h1" I should see "Add Agent"
|
|
148
|
+ And I fill in "Agent Role" with "Treasure Hunter"
|
|
149
|
+ And I fill in "Objective" with "Follow the step to find the treasure."
|
|
150
|
+ And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
|
|
151
|
+ Then within the ".step_form" number "1" I click in the link "Step"
|
|
152
|
+ Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
|
|
153
|
+ And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
|
|
154
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
155
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
156
|
+ And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
|
|
157
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
158
|
+ And within the ".step_form" number "1" I click in the link "Add Validation"
|
|
159
|
+ And within the ".step_form" number "1" I click in the link "Text Validation"
|
|
160
|
+ And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
|
|
161
|
+ And I wait for 1 seconds
|
|
162
|
+ And I click in the button "Save Agent"
|
|
163
|
+ And I wait for 3 seconds
|
|
164
|
+ Then within "h1" I should see "Agents"
|
|
165
|
+ And I should see "Treasure Hunter"
|
|
166
|
+ And I click in the link "Next"
|
|
167
|
+ Then within "h1" I should see "Launch Mission"
|
|
168
|
+ And I wait for 2 seconds
|
|
169
|
+ And I click in the link "Review Mission"
|
|
170
|
+ And I wait for 2 seconds
|
|
171
|
+ Then within "h1" I should see "Treaure Hunt"
|
|
172
|
+ And I should see "Planning"
|
|
173
|
+ And I should see "Follow the steps to find the treasure."
|
|
174
|
+ And I should see "Hello, welcome to the Treasure Hunt Mission!"
|
|
175
|
+ And I should see "Chocolate Bar"
|
|
176
|
+ And within ".mission-director-name" I should see "Monty Cantsin"
|
|
177
|
+ Then within "#mission-tabs-nav" I click in the link "Agents"
|
|
178
|
+ And I wait for 2 seconds
|
|
179
|
+ And I should see "Treasure Hunter"
|
|
180
|
+ And I should see "Planning"
|
|
181
|
+ And I should see "Follow the step to find the treasure."
|
|
182
|
+ And I should see "Go to the train station"
|
|
183
|
+ And I should see "Get the first train"
|
|
184
|
+ And I should not see "Go to the last station"
|
|
185
|
+ And I should not see "Wait for the pickup"
|
|
186
|
+ Then I click in the link "Edit Mission"
|
|
187
|
+ And I wait for 3 seconds
|
|
188
|
+ And within "h1" I should see "Launch Mission"
|
|
189
|
+ And I click in the link "Launch Mission"
|
|
190
|
+ Then within "h1" I should see "Treaure Hunt"
|
|
191
|
+ And I should see "Launched"
|
|
192
|
+ And within ".mission-timer" I should see "5"
|
|
193
|
+ And I should see "Days remaining"
|
|
194
|
+ And within ".mission-director-name" I should see "Monty Cantsin"
|
|
195
|
+ And I wait for 3 seconds
|
|
196
|
+ Then I go to the missions page
|
|
197
|
+ And I wait for 3 seconds
|
|
198
|
+ Then I go to the homepage
|
|
199
|
+ And I wait for 3 seconds
|