Commit 36eb02becbd22b2120ca1331058799eec4aad660
1 parent
134ba7e7
Added cancel award and fixed bids on auction
Showing
2 changed files
with
34 additions
and
28 deletions
op_robot_tests/tests_files/data/aucion_data.yaml
→
op_robot_tests/tests_files/data/auction_data.yaml
@@ -8,19 +8,19 @@ Library DebugLibrary | @@ -8,19 +8,19 @@ Library DebugLibrary | ||
8 | 8 | ||
9 | *** Keywords *** | 9 | *** Keywords *** |
10 | Init auction data | 10 | Init auction data |
11 | - ${auction_data}= load_initial_data_from aucion_data.yaml | 11 | + ${auction_data}= load_initial_data_from auction_data.yaml |
12 | Set Global Variable ${auction_data} | 12 | Set Global Variable ${auction_data} |
13 | 13 | ||
14 | Create api wrapper | 14 | Create api wrapper |
15 | Init auction data | 15 | Init auction data |
16 | ${API}= prepare_api ${api_key} | 16 | ${API}= prepare_api ${api_key} |
17 | Set Global Variable ${API} | 17 | Set Global Variable ${API} |
18 | - LOG ${API} | 18 | + LOG ${API} |
19 | Log Variables | 19 | Log Variables |
20 | 20 | ||
21 | Set access key on tender | 21 | Set access key on tender |
22 | ${tender}= set_access_key ${tender} ${access_token} | 22 | ${tender}= set_access_key ${tender} ${access_token} |
23 | - Set Global Variable ${tender} | 23 | + Set Global Variable ${tender} |
24 | 24 | ||
25 | Create tender | 25 | Create tender |
26 | ${init_tender_data}= prepare_test_tender_data | 26 | ${init_tender_data}= prepare_test_tender_data |
@@ -31,7 +31,7 @@ Create tender | @@ -31,7 +31,7 @@ Create tender | ||
31 | Set Global Variable ${access_token} | 31 | Set Global Variable ${access_token} |
32 | ${tender_id}= Get Variable Value ${tender.data.id} | 32 | ${tender_id}= Get Variable Value ${tender.data.id} |
33 | Set Global Variable ${tender_id} | 33 | Set Global Variable ${tender_id} |
34 | - Log access_key: ${access_token} | 34 | + Log access_key: ${access_token} |
35 | Log tender_id: ${tender_id} | 35 | Log tender_id: ${tender_id} |
36 | Log Variables | 36 | Log Variables |
37 | Set Global Variable ${tender} | 37 | Set Global Variable ${tender} |
@@ -48,7 +48,7 @@ Change tender title | @@ -48,7 +48,7 @@ Change tender title | ||
48 | Log object data ${tender} | 48 | Log object data ${tender} |
49 | ${tender}= Call Method ${API} patch_tender ${tender} | 49 | ${tender}= Call Method ${API} patch_tender ${tender} |
50 | Set Global Variable ${tender} | 50 | Set Global Variable ${tender} |
51 | - Log object data ${tender} tender_changed_titles | 51 | + Log object data ${tender} tender_changed_titles |
52 | Set access key on tender | 52 | Set access key on tender |
53 | 53 | ||
54 | Change tender periods | 54 | Change tender periods |
@@ -104,7 +104,7 @@ Wait to tender period with name ${period_name} | @@ -104,7 +104,7 @@ Wait to tender period with name ${period_name} | ||
104 | Review tender | 104 | Review tender |
105 | 105 | ||
106 | Wait to start of auction's worker | 106 | Wait to start of auction's worker |
107 | - Sleep 4 minutes | 107 | + Sleep 4 minutes |
108 | 108 | ||
109 | Submit bids | 109 | Submit bids |
110 | Review tender | 110 | Review tender |
@@ -112,7 +112,7 @@ Submit bids | @@ -112,7 +112,7 @@ Submit bids | ||
112 | ${bids_items}= Get Dictionary Items ${auction_data.bidders} | 112 | ${bids_items}= Get Dictionary Items ${auction_data.bidders} |
113 | :FOR ${bidder_key} ${bidder_data} IN @{bids_items} | 113 | :FOR ${bidder_key} ${bidder_data} IN @{bids_items} |
114 | \ ${bid}= test bid data | 114 | \ ${bid}= test bid data |
115 | - \ Log object data ${bid} | 115 | + \ Log object data ${bid} |
116 | \ ${temp_amount}= Get Variable Value ${auction_data.bidders.${bidder_key}.start_bid} | 116 | \ ${temp_amount}= Get Variable Value ${auction_data.bidders.${bidder_key}.start_bid} |
117 | \ Log ${temp_amount} | 117 | \ Log ${temp_amount} |
118 | \ ${bid.data.value.amount}= Get Variable Value ${temp_amount} | 118 | \ ${bid.data.value.amount}= Get Variable Value ${temp_amount} |
@@ -135,9 +135,9 @@ Get particular urls for bids | @@ -135,9 +135,9 @@ Get particular urls for bids | ||
135 | :FOR ${bidder_key} ${bidder_data} IN @{bids_items} | 135 | :FOR ${bidder_key} ${bidder_data} IN @{bids_items} |
136 | \ ${approved_bid}= Call Method ${API} get_bid ${tender} ${bidder_data.tender_bid_data.data.id} ${bidder_data.tender_bid_data.access.token} | 136 | \ ${approved_bid}= Call Method ${API} get_bid ${tender} ${bidder_data.tender_bid_data.data.id} ${bidder_data.tender_bid_data.access.token} |
137 | \ Log object data ${approved_bid} | 137 | \ Log object data ${approved_bid} |
138 | - \ Log ${approved_bid.data.participationUrl} | 138 | + \ Log ${approved_bid.data.participationUrl} |
139 | \ Set To Dictionary ${auction_data.bidders.${bidder_key}} start_url ${approved_bid.data.participationUrl} | 139 | \ Set To Dictionary ${auction_data.bidders.${bidder_key}} start_url ${approved_bid.data.participationUrl} |
140 | - Log object data ${auction_data} auction_data_after_get_particular_urls | 140 | + Log object data ${auction_data} auction_data_after_get_particular_urls |
141 | Set Global Variable ${auction_data} | 141 | Set Global Variable ${auction_data} |
142 | 142 | ||
143 | 143 | ||
@@ -145,10 +145,10 @@ Get auction url for observer | @@ -145,10 +145,10 @@ Get auction url for observer | ||
145 | Review tender | 145 | Review tender |
146 | Set To Dictionary ${auction_data.observer} start_url ${tender.data.auctionUrl} | 146 | Set To Dictionary ${auction_data.observer} start_url ${tender.data.auctionUrl} |
147 | Log object data ${auction_data} auction_data_after_add_auction_url | 147 | Log object data ${auction_data} auction_data_after_add_auction_url |
148 | - Set Global Variable ${auction_data} | 148 | + Set Global Variable ${auction_data} |
149 | 149 | ||
150 | 150 | ||
151 | -Wait to end of auction | 151 | +Wait to end of auction |
152 | Sleep 1 minutes Wait to end of auction | 152 | Sleep 1 minutes Wait to end of auction |
153 | 153 | ||
154 | 154 | ||
@@ -161,35 +161,41 @@ Activate award | @@ -161,35 +161,41 @@ Activate award | ||
161 | Log object data ${award_approve} | 161 | Log object data ${award_approve} |
162 | ${approved_award}= Call Method ${API} patch_award ${tender} ${award_approve} | 162 | ${approved_award}= Call Method ${API} patch_award ${tender} ${award_approve} |
163 | Log object data ${approved_award} award_approved | 163 | Log object data ${approved_award} award_approved |
164 | - | 164 | + ${award_canceled}= create_approve_award_request_data ${awards.data[0].id} |
165 | + Set To Dictionary ${award_canceled.data} status cancelled | ||
166 | + Log object data ${award_canceled} | ||
167 | + ${canceled_award}= Call Method ${API} patch_award ${tender} ${award_canceled} | ||
168 | + Log object data ${canceled_award} award_canceled | ||
169 | + ${awards}= Call Method ${API} get_awards ${tender} | ||
170 | + Log object data ${awards} awards_after_cancel_one | ||
165 | 171 | ||
166 | Game process begin | 172 | Game process begin |
167 | Open Browser To bidder0 Login Page | 173 | Open Browser To bidder0 Login Page |
168 | - Open Browser To bidder1 Login Page | 174 | + Open Browser To bidder1 Login Page |
169 | Open Browser as observer | 175 | Open Browser as observer |
170 | Auction is on round 1 | 176 | Auction is on round 1 |
171 | bidder1 leaves bid 40000 | 177 | bidder1 leaves bid 40000 |
172 | - Capture Page Screenshot | 178 | + Capture Page Screenshot |
173 | bidder0 leaves bid 39000 | 179 | bidder0 leaves bid 39000 |
174 | - Capture Page Screenshot | 180 | + Capture Page Screenshot |
175 | Auction is finished | 181 | Auction is finished |
176 | - Capture Page Screenshot | 182 | + Capture Page Screenshot |
177 | 183 | ||
178 | Open Browser To ${bidder} Login Page | 184 | Open Browser To ${bidder} Login Page |
179 | Open Browser ${auction_data.bidders.${bidder}.start_url} ${auction_data.bidders.${bidder}.browser} ${bidder} | 185 | Open Browser ${auction_data.bidders.${bidder}.start_url} ${auction_data.bidders.${bidder}.browser} ${bidder} |
180 | - Maximize Browser Window | 186 | + Maximize Browser Window |
181 | Oauth Confirm Page Should Be Open | 187 | Oauth Confirm Page Should Be Open |
182 | ${bidder} agree with rules | 188 | ${bidder} agree with rules |
183 | Sleep 2 | 189 | Sleep 2 |
184 | - Capture Page Screenshot | 190 | + Capture Page Screenshot |
185 | 191 | ||
186 | 192 | ||
187 | Open Browser as observer | 193 | Open Browser as observer |
188 | - Open Browser ${auction_data.observer.start_url} ${auction_data.observer.browser} observer | ||
189 | - Maximize Browser Window | ||
190 | - Capture Page Screenshot | 194 | + Open Browser ${auction_data.observer.start_url} ${auction_data.observer.browser} observer |
195 | + Maximize Browser Window | ||
196 | + Capture Page Screenshot | ||
191 | 197 | ||
192 | -Oauth Confirm Page Should Be Open | 198 | +Oauth Confirm Page Should Be Open |
193 | Title Should Be Authorization | 199 | Title Should Be Authorization |
194 | Capture Page Screenshot | 200 | Capture Page Screenshot |
195 | 201 | ||
@@ -201,8 +207,8 @@ ${bidder} agree with rules | @@ -201,8 +207,8 @@ ${bidder} agree with rules | ||
201 | 207 | ||
202 | submit bid ${amount} on auction | 208 | submit bid ${amount} on auction |
203 | Wait Until Page Contains до закінчення вашої черги 600 | 209 | Wait Until Page Contains до закінчення вашої черги 600 |
204 | - Input Text xpath = //input[@id="bid"] ${amount} | ||
205 | - Click Button xpath = //button[@class="btn btn-success ng-scope"] | 210 | + Input Text xpath = //input[@id="bid-amount-input"] ${amount} |
211 | + Click Button xpath = //button[@id="place-bid-button"] | ||
206 | Wait Until Page Contains Заявку прийнято 10 | 212 | Wait Until Page Contains Заявку прийнято 10 |
207 | Page Should Not Contain Надто висока заявка | 213 | Page Should Not Contain Надто висока заявка |
208 | 214 | ||
@@ -212,15 +218,15 @@ ${bidder} leaves bid ${amount} | @@ -212,15 +218,15 @@ ${bidder} leaves bid ${amount} | ||
212 | 218 | ||
213 | 219 | ||
214 | Auction is finished | 220 | Auction is finished |
215 | - Wait Until Page Contains Аукціон завершився 600 | 221 | + Wait Until Page Contains Аукціон завершився 700 |
216 | ${value} = Get Text xpath= //p[@class="round-number ng-scope"] | 222 | ${value} = Get Text xpath= //p[@class="round-number ng-scope"] |
217 | Should Be Equal ${value} Завершено | 223 | Should Be Equal ${value} Завершено |
218 | Capture Page Screenshot | 224 | Capture Page Screenshot |
219 | 225 | ||
220 | -Auction is on round ${value3} | 226 | +Auction is on round ${value3} |
221 | Wait Until Page Contains до закінчення раунду 1200 | 227 | Wait Until Page Contains до закінчення раунду 1200 |
222 | ${round} = Get Text xpath = //p[@class="round-label ng-scope"] | 228 | ${round} = Get Text xpath = //p[@class="round-label ng-scope"] |
223 | ${number} = Get Text xpath = //p[@class="round-number ng-binding"] | 229 | ${number} = Get Text xpath = //p[@class="round-number ng-binding"] |
224 | Should Be Equal ${round} Раунд | 230 | Should Be Equal ${round} Раунд |
225 | - Should Be Equal ${number} ${value3} | ||
226 | - Capture Page Screenshot | ||
231 | + Should Be Equal ${number} ${value3} | ||
232 | + Capture Page Screenshot |
Please
register
or
login
to post a comment