Commit 043985e462c520ac09ab3509d4463e49f0c65cbd
Merge pull request #1 from yankee7/master
added testcases for 2 bidders and observer
Showing
4 changed files
with
169 additions
and
17 deletions
| @@ -4,21 +4,21 @@ Resource resource.robot | @@ -4,21 +4,21 @@ Resource resource.robot | ||
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | *** Test Cases *** | 6 | *** Test Cases *** |
| 7 | -Tender process | ||
| 8 | - Create api wrapper | ||
| 9 | - Create tender | ||
| 10 | - Change tender title | ||
| 11 | - Upload tender documentation | ||
| 12 | - Change tender periods | ||
| 13 | - Create question | ||
| 14 | - Write answer on first question | ||
| 15 | - Wait to TenderPeriod | ||
| 16 | - Submit bids | ||
| 17 | - Review tender | ||
| 18 | - Wait to start of auction's worker | ||
| 19 | - Get particular urls for bids | ||
| 20 | - Review tender | ||
| 21 | - Wait to end of auction | ||
| 22 | - Review tender | ||
| 23 | - Activate award | 7 | +#Tender process |
| 8 | +# Create api wrapper | ||
| 9 | +# Create tender | ||
| 10 | + #Change tender title | ||
| 11 | + # Upload tender documentation | ||
| 12 | + # Change tender periods | ||
| 13 | + # Create question | ||
| 14 | + # Write answer on first question | ||
| 15 | + # Wait to TenderPeriod | ||
| 16 | + # Submit bids | ||
| 17 | + # Review tender | ||
| 18 | + # Wait to start of auction's worker | ||
| 19 | + # Get particular urls for bids | ||
| 20 | + # Review tender | ||
| 21 | + # Wait to end of auction | ||
| 22 | + # Review tender | ||
| 23 | +# Activate award | ||
| 24 | 24 |
op_robot_tests/tests_files/auction.robot
0 → 100644
| 1 | +*** Setting *** | ||
| 2 | +Resource keywords.robot | ||
| 3 | +Resource resource.robot | ||
| 4 | +Resource auction_keywords.robot | ||
| 5 | + | ||
| 6 | + | ||
| 7 | +*** Test Cases *** | ||
| 8 | +Valid Login | ||
| 9 | + Open Browser as observer | ||
| 10 | + Open Browser To Login Page bidder1 | ||
| 11 | + Open Browser To Login Page bidder2 | ||
| 12 | + Switch Browser observer | ||
| 13 | + Auction is in standby | ||
| 14 | + Auction is between rounds → 1 | ||
| 15 | + Auction is on round 1 | ||
| 16 | + | ||
| 17 | +auction runs 1 round | ||
| 18 | + bidder1 leaves bid 475000 | ||
| 19 | + bidder2 leaves bid 470000 | ||
| 20 | + Switch Browser observer | ||
| 21 | + Auction is between rounds 1 → 2 | ||
| 22 | + | ||
| 23 | +auction runs 2 round | ||
| 24 | + Auction is on round 2 | ||
| 25 | + bidder1 leaves bid 465000 | ||
| 26 | + bidder2 leaves bid 460000 | ||
| 27 | + Switch Browser observer | ||
| 28 | + Auction is between rounds 2 → 3 | ||
| 29 | + | ||
| 30 | +auction is on last round | ||
| 31 | + Auction is on last round 3 | ||
| 32 | + bidder1 leaves bid 455000 | ||
| 33 | + bidder2 leaves bid 450000 | ||
| 34 | + Switch Browser observer | ||
| 35 | + Auction is finished | ||
| 36 | + [Teardown] Close Browser | ||
| 37 | + |
| 1 | +*** Setting *** | ||
| 2 | +Library op_robot_tests.tests_files.ApiCommands | ||
| 3 | +Library String | ||
| 4 | +LIbrary Collections | ||
| 5 | +LIbrary Selenium2Library | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +*** Variables *** | ||
| 9 | +${BROWSER} googlechrome | ||
| 10 | +${DELAY} 1 | ||
| 11 | +${URL} http://cygnet.office.quintagroup.com:9001/tenders/ua3 | ||
| 12 | +#http://auction-sandbox.openprocurement.org/ | ||
| 13 | + | ||
| 14 | + | ||
| 15 | +${AUCTION_URL} http://cygnet.office.quintagroup.com:9001/tenders/ua3 | ||
| 16 | +${LOGIN URL1} ${AUCTION_URL}/login?bidder_id=d3ba84c66c9e4f34bfb33cc3c686f137&hash=4e79e605bfecbaa9ac4d0d974c541ee2988f7377 | ||
| 17 | +${LOGIN URL2} ${AUCTION_URL}/login?bidder_id=5675acc9232942e8940a034994ad883e&hash=bd4a790aac32b73e853c26424b032e5a29143d1f | ||
| 18 | + | ||
| 19 | +#$x('/html/body/div/div[1]/div/div[1]//*[contains(text(),"Аукціон завершився")]') | ||
| 20 | +#[<span ng-if="$parent.info_timer.msg" class="ng-binding ng-scope">…</span>] | ||
| 21 | +# http://cygnet.office.quintagroup.com:9001/tenders/ua3/login?bidder_id=d3ba84c66c9e4f34bfb33cc3c686f137&hash=4e79e605bfecbaa9ac4d0d974c541ee2988f7377 | ||
| 22 | + | ||
| 23 | +*** Keywords *** | ||
| 24 | +Open Browser as observer | ||
| 25 | + Open Browser ${AUCTION_URL} ${BROWSER} observer | ||
| 26 | + Maximize Browser Window | ||
| 27 | + Capture Page Screenshot | ||
| 28 | + | ||
| 29 | +Open Browser To Login Page bidder1 | ||
| 30 | + Open Browser ${LOGIN URL1} ${BROWSER} bidder1 | ||
| 31 | + Maximize Browser Window | ||
| 32 | + Oauth Confirm Page Should Be Open | ||
| 33 | + Capture Page Screenshot | ||
| 34 | + Agree with rules | ||
| 35 | + | ||
| 36 | +Open Browser To Login Page bidder2 | ||
| 37 | + Open Browser ${LOGIN URL2} ${BROWSER} bidder2 | ||
| 38 | + Maximize Browser Window | ||
| 39 | + Oauth Confirm Page Should Be Open | ||
| 40 | + Capture Page Screenshot | ||
| 41 | + Agree with rules | ||
| 42 | + | ||
| 43 | +Agree with rules | ||
| 44 | + Click Button xpath=//form/div/button[1] | ||
| 45 | + #Auction Page Should Be Open | ||
| 46 | + | ||
| 47 | +Oauth Confirm Page Should Be Open | ||
| 48 | + Title Should Be Authorization | ||
| 49 | + | ||
| 50 | +Auction Page Should Be Open | ||
| 51 | + Location Should Be ${AUCTION_URL} | ||
| 52 | + Page Should Contain UA-11111 | ||
| 53 | + Wait Until Page Contains до закінчення вашої черги 600 | ||
| 54 | + Capture Page Screenshot | ||
| 55 | + | ||
| 56 | +Start Browser | ||
| 57 | + Open Browser ${URL} ${BROWSER} | ||
| 58 | + Capture Page Screenshot | ||
| 59 | + | ||
| 60 | +Auction is in standby | ||
| 61 | + Page Should Contain до початку аукціону 600 | ||
| 62 | + ${value} = Get Text xpath = //p[@class="round-number ng-scope"] | ||
| 63 | + Should Be Equal ${value} Очікування | ||
| 64 | + Capture Page Screenshot | ||
| 65 | + | ||
| 66 | +Auction is between rounds ${value1} | ||
| 67 | + Wait Until Page Contains до початку раунду 600 | ||
| 68 | + ${value} = Get Text xpath = //span[@class="round-number ng-binding"] | ||
| 69 | + Should Be Equal ${value1} ${value} | ||
| 70 | + Capture Page Screenshot | ||
| 71 | + | ||
| 72 | +Auction is on round ${value3} | ||
| 73 | + Wait Until Page Contains до закінчення раунду 600 | ||
| 74 | + ${round} = Get Text xpath = //p[@class="round-label ng-scope"] | ||
| 75 | + ${number} = Get Text xpath = //p[@class="round-number ng-binding"] | ||
| 76 | + Should Be Equal ${round} Раунд | ||
| 77 | + Should Be Equal ${number} ${value3} | ||
| 78 | + Capture Page Screenshot | ||
| 79 | + | ||
| 80 | +Auction is on last round ${value3} | ||
| 81 | + Wait Until Page Contains до оголошення результатів 600 | ||
| 82 | + ${round} = Get Text xpath = //p[@class="round-label ng-scope"] | ||
| 83 | + ${number} = Get Text xpath = //p[@class="round-number ng-binding"] | ||
| 84 | + Should Be Equal ${round} Раунд | ||
| 85 | + Should Be Equal ${number} ${value3} | ||
| 86 | + Capture Page Screenshot | ||
| 87 | + | ||
| 88 | +Auction is finished | ||
| 89 | + Wait Until Page Contains Аукціон завершився 600 | ||
| 90 | + ${value} = Get Text xpath = //p[@class="round-number ng-scope"] | ||
| 91 | + Should Be Equal ${value} Завершено | ||
| 92 | + Capture Page Screenshot | ||
| 93 | + | ||
| 94 | +*** Keywords *** | ||
| 95 | +#bidding keywords | ||
| 96 | + | ||
| 97 | +#get minimum bid value | ||
| 98 | + | ||
| 99 | +submit bid ${amount} | ||
| 100 | + Wait Until Page Contains до закінчення вашої черги 300 | ||
| 101 | + Input Text xpath = //input[@id="bid"] ${amount} | ||
| 102 | + Click Button xpath = //button[@class="btn btn-success ng-scope"] | ||
| 103 | + Wait Until Page Contains Заявку прийнято 10 | ||
| 104 | + Page Should Not Contain Надто висока заявка | ||
| 105 | + | ||
| 106 | +bidder1 leaves bid ${amount} | ||
| 107 | + Switch Browser bidder1 | ||
| 108 | + submit bid ${amount} | ||
| 109 | + | ||
| 110 | +bidder2 leaves bid ${amount} | ||
| 111 | + Switch Browser bidder2 | ||
| 112 | + submit bid ${amount} | ||
| 113 | + | ||
| 114 | + |
Please
register
or
login
to post a comment