CBD3-DU-MA-UC-01-02.robot 3.07 KB
Newer Older
1
2
3
4
*** Settings ***
Documentation  1. Формування посилань на модуль аукціону
    ...  Одна подана заява на участь протягом tenderPeriod (до старту Голландського етапу
    ...  https://confluence-sale.prozorro.org/pages/viewpage.action?pageId=63276306#id-ТестуванняМАDutch-CBD3-DU-MA-UC-01-02
Vladyslav Koval's avatar
Vladyslav Koval committed
5
Default Tags  module_1
6
7
Resource  ../fixtures/Resources/auction_conditions.robot
Test Setup  Check For Pass Before
Vladyslav Koval's avatar
Vladyslav Koval committed
8
9
10
Suite Setup  Create Session  api_procedures  %{PROCEDURE_URL}  verify=True
Suite Teardown  Run Keywords  Delete All Sessions  Close All Browsers 

11
12
13
14
15
16
17
18
19
20
21
22
23
24

*** Variables ***
${AUCTION_NAME}  subsoil-dutch-fast


*** Test Cases ***
Подати одну заяву на участь протягом tenderPeriod до старту Голландського раунду.

    ${ACTION_START_TIME} =  Get Time  format=timestamp  time_=UTC +5m

    Import Variables  ../fixtures/${AUCTION_NAME}.py  init_auction
    Import Variables  ../fixtures/subsoil-dutch-fast-bid.py  init_bid
    
    Set To Dictionary  ${init_auction["auctionPeriod"]}  startDate  ${ACTION_START_TIME}
Vladyslav Koval's avatar
Vladyslav Koval committed
25
    ${RESP} =  POST On Session  api_procedures  /api/procedures  json=${init_auction}  headers=${DEFAULT_HEADERS}  expected_status=201
26
27
28
29
    ${ID} =  Get From Dictionary  ${resp.json()}  id
    Set Suite Variable  ${ID}  ${ID}
    ${RESP}=  Get Request and return resp By  ${ID}  ${WATCHER}
    Status Should Be  200  ${RESP}
Vladyslav Koval's avatar
Vladyslav Koval committed
30
    Sleep  2m 20s  Waiting for active_tendering
31
32
33
34

    ${RESP}=  Get Request and return resp By  ${ID}  ${WATCHER}
    Status Should Be  200  ${RESP}
    ${STATUS} =  Get From Dictionary  ${resp.json()}  status
Vladyslav Koval's avatar
Vladyslav Koval committed
35
    Log To Console  ${STATUS}
36
37
    Should Be Equal  active_tendering  ${STATUS}

Vladyslav Koval's avatar
Vladyslav Koval committed
38
    ${RESP} =  POST On Session  api_procedures  /api/procedures/${ID}/bids  json=${init_bid}  headers=${DEFAULT_HEADERS}  expected_status=201
39
40
41
42
43
    Status Should Be  201  ${RESP}
    ${BID_ID} =  Get From Dictionary  ${resp.json()}  id
    Set Suite Variable  ${BID_ID}  ${BID_ID}
    ${BID_ACC_TOKEN} =  Get From Dictionary  ${resp.json()}  acc_token
    Set Suite Variable  ${BID_ACC_TOKEN}  ${BID_ACC_TOKEN}
Vladyslav Koval's avatar
Vladyslav Koval committed
44
    ${RESP} =  PATCH On Session  api_procedures  /api/procedures/${ID}/bids/${BID_ID}/status  data={"status":"active"}  headers=${DEFAULT_HEADERS}  params=acc_token=${BID_ACC_TOKEN}
45
46
47
48
    Status Should Be  200  ${RESP}

Перевірити формування в ЦБД приватного посилання для участі в модулі аукціону при переходi в active_auction

Vladyslav Koval's avatar
Vladyslav Koval committed
49
    Sleep  3m 30s  Waiting for active_auction
50
51
52
53
54
55
56
57
    ${RESP} =  Get Request and return resp By  ${ID}  ${BID_ACC_TOKEN}
    Status Should Be  200  ${RESP}
    ${ACTIVE_STATUS} =  Get From Dictionary  ${resp.json()}  status
    Should Be Equal  active_auction  ${ACTIVE_STATUS}     
    ${AUCTION_URL} =  Get From Dictionary  ${resp.json()}  auctionUrl
    Should Contain  ${AUCTION_URL}  %{AUCTION_URL}
    ${BIDDER_URL} =  Get Request and return participationUrl By  ${ID}  ${BID_ACC_TOKEN}
    Should Contain  ${BIDDER_URL}  %{PROCEDURE_URL}