Commit c077938d authored by Vladyslav Koval's avatar Vladyslav Koval
Browse files

Fix DGF auctions

added new keywords for dgf tests with another endpoint
parent f19f70f5
Pipeline #20010 passed with stages
in 30 minutes and 37 seconds
......@@ -34,4 +34,4 @@ services:
- AUCTION_URL
- PROCEDURE_URL
- AUCTION_TOKEN
command: pabot --skip dgf --argumentfile robotframe_regression.args src/regression_tests/
command: pabot --argumentfile robotframe_regression.args src/regression_tests/
......@@ -15,6 +15,7 @@ ${AUCTION_NAME} dgf-dutch-initial-auction
*** Test Cases ***
Run Browsers
[Documentation] Підготовити браузери
[Setup] NONE
......@@ -30,7 +31,18 @@ Run Browsers
Post Requests
[Documentation] Зробити Post Requests для ${AUCTION_NAME}
Post Now ${AUCTION_NAME}
${ACTION_START_TIME}= Get Time format=timestamp time_=UTC + 2s
Create Session alias https://dgf-procedure-sandbox.prozorro.sale verify=true
&{headers_post}= Create Dictionary Authorization=auction_token Content-Type=application/json
Import Variables ../fixtures/${AUCTION_NAME}.py init_auction
Set To Dictionary ${init_auction["auctionPeriod"]} startDate ${ACTION_START_TIME}
${RESP}= Post Request alias /api/procedures data=${init_auction} headers=${HEADERS_POST}
${ID}= Get From Dictionary ${resp.json()} id
Set Suite Variable ${ID} ${ID}
......@@ -139,7 +151,6 @@ Action - offer of the winner of the Dutch stage
Check action results
Pass Execution Skipped because of token issue
[Documentation] Перевірка сторінки аукціону після завершення
Wait Until Page Contains Аукціон завершено 70s
Wait Until Element Is Visible ${ANNOUNCEMENT_RESULTS}
......@@ -191,7 +202,7 @@ Open Browser Maximized
Get Request By
[Arguments] ${ID} ${USER_TOKEN}=None
Create Session alias %{PROCEDURE_URL} verify=true
Create Session alias https://dgf-procedure-sandbox.prozorro.sale verify=true
&{headers}= Create Dictionary Authorization=auction_token Content-Type=text/plain
${URI}= Catenate SEPARATOR= /api/procedures/ ${ID} ?acc_token= ${USER_TOKEN}
${RESP}= Get Request alias uri=${URI} headers=${HEADERS}
......
*** Settings ***
Documentation Ініціалізація та проходження аукціону ( Skipped because of token issue )
Documentation Ініціалізація та проходження аукціону
Default Tags dgf
Library Collections
......@@ -19,14 +19,28 @@ Prepare browsers
[Setup] NONE
Run Browsers In Blank For 3 Bidders
Post Requests Action and Allow Terms
Post Now ${AUCTION_NAME}
Post Auction
${ACTION_START_TIME}= Get Time format=timestamp time_=UTC + 2s
${BIDDER_URL_1}= Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[0]}
${BIDDER_URL_2}= Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[1]}
${BIDDER_URL_3}= Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[2]}
Create Session alias https://dgf-procedure-sandbox.prozorro.sale verify=true
&{headers_post}= Create Dictionary Authorization=auction_token Content-Type=application/json
Import Variables ../fixtures/${AUCTION_NAME}.py init_auction
Set To Dictionary ${init_auction["auctionPeriod"]} startDate ${ACTION_START_TIME}
${RESP}= Post Request alias /api/procedures data=${init_auction} headers=${HEADERS_POST}
${ID}= Get From Dictionary ${resp.json()} id
Set Suite Variable ${ID} ${ID}
Allow Terms for 3 Bidders
Check Action Status active_auction
${BIDDER_URL_1}= Get DGF Request and return participationUrl By ${ID} ${BIDDER_TOKEN[0]}
${BIDDER_URL_2}= Get DGF Request and return participationUrl By ${ID} ${BIDDER_TOKEN[1]}
${BIDDER_URL_3}= Get DGF Request and return participationUrl By ${ID} ${BIDDER_TOKEN[2]}
${RESP} = Get DGF Request and return resp By ${ID} ${WATCHER}
${STATUS} = Get From Dictionary ${resp.json()} status
Should Be Equal active_auction ${STATUS}
Switch Browser chrome_${BIDDER_TOKEN[0]}
Allow Terms ${BIDDER_URL_1}
......@@ -107,7 +121,36 @@ Action - round 3
Check in end
Pass Execution Skipped because of token issue
Wait Until Page Contains Аукціон завершено 20s
Wait Until Element Is Visible ${ANNOUNCEMENT_RESULTS}
Check Action Results For CHECK_STATUS=active_awarded CHECK_AMOUNT=${9 * ${MINIMALSTEP} + ${AMOUNT} * 100}.0
Check DGF Action Results For CHECK_STATUS=active_awarded CHECK_AMOUNT=${9 * ${MINIMALSTEP} + ${AMOUNT} * 100}.0
*** Keywords ***
Get DGF Request and return participationUrl By
[Arguments] ${ID} ${USER_TOKEN}
Create Session alias https://dgf-procedure-sandbox.prozorro.sale verify=true
&{headers}= Create Dictionary Authorization=auction_token Content-Type=text/plain
${URI}= Catenate SEPARATOR= /api/procedures/ ${ID} ?acc_token= ${USER_TOKEN}
${RESP}= Get Request alias uri=${URI} headers=${HEADERS}
${BIDDER_URL}= Get From Dictionary ${resp.json()['bids'][0]} participationUrl
[return] ${BIDDER_URL}
Get DGF Request and return resp By
[Arguments] ${ID} ${USER_TOKEN}
Create Session alias https://dgf-procedure-sandbox.prozorro.sale verify=true
&{headers}= Create Dictionary Authorization=auction_token Content-Type=text/plain
${URI}= Catenate SEPARATOR= /api/procedures/ ${ID} ?acc_token= ${USER_TOKEN}
${RESP}= Get Request alias uri=${URI} headers=${HEADERS}
[return] ${RESP}
Check DGF Action Results For
[Documentation] Перевірка сторінки аукціону після завершення
[Arguments] ${CHECK_STATUS} ${CHECK_AMOUNT}
${RESP} = Get DGF Request and return resp By ${ID} ${WATCHER}
${STATUS} = Get From Dictionary ${resp.json()} status
Should Be Equal ${CHECK_STATUS} ${STATUS}
${AMOUNT} = Get From Dictionary ${resp.json()['awards'][0]['value']} amount
Should Be Equal As Strings ${CHECK_AMOUNT} ${AMOUNT}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment