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