Commit a63ef8ea authored by Vladyslav Koval's avatar Vladyslav Koval Committed by vvk
Browse files

Add test for CBD3-TE-MA-UC-05-08

Bid Change block
parent 0667ca50
Pipeline #21312 passed with stages
in 36 minutes and 4 seconds
*** Settings ***
Documentation 5.Функціональні особливості відображення блоків модулю аукціону
... Блок Bid Change
... https://confluence-sale.prozorro.org/pages/viewpage.action?pageId=60950735#id-ТестуванняМАEnglish-CBD3-TE-MA-UC-05-08
Library String
Library DateTime
Resource ../fixtures/Resources/auction_conditions.robot
Test Setup Check For Pass Before
Suite Setup Create Session api_procedures %{PROCEDURE_URL} verify=True
Suite Teardown Run Keywords Delete All Sessions Close All Browsers
*** Variables ***
${AUCTION_NAME} timber-english-initial-auction
*** Test Cases ***
Init Auction
${ACTION_START_TIME} = Get Time format=timestamp time_=UTC + 15s
Import Variables ../fixtures/${AUCTION_NAME}.py init_auction
Set To Dictionary ${init_auction["auctionPeriod"]} startDate ${ACTION_START_TIME}
${RESP} = POST On Session api_procedures /api/procedures json=${init_auction} headers=${DEFAULT_HEADERS} expected_status=201
${ID} = Get From Dictionary ${resp.json()} id
Set Suite Variable ${ID} ${ID}
Check Action Status active_auction
Init Watcher
${RESP} = Get Request and return resp By ${ID} ${WATCHER}
Status Should Be 200 ${RESP}
${AUCTION_URL} = Get From Dictionary ${resp.json()} auctionUrl
Open Browser Maximized ${AUCTION_URL} ${WATCHER}
Element Should Not Be Visible //span[@class="bidder-info-text"]
Init Bidder
Open Browser Maximized about:blank ${BIDDER_TOKEN[2]}
${BIDDER_URL_3} = Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[2]}
Allow Terms ${BIDDER_URL_3}
Open Browser Maximized about:blank ${BIDDER_TOKEN[1]}
${BIDDER_URL_2} = Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[1]}
Allow Terms ${BIDDER_URL_2}
1. Відображення інформації в блоці Bid Change під час очікування аукціону
Switch Browser chrome_${BIDDER_TOKEN[2]}
Page Should Not Contain Element ${BTN_BET}
Page Should Not Contain Element ${NUMBER_INPUT}
2. Відображення інформації в блоці Bid Change під час перiоду аукціону
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Page Contains Element //span[@class='bidder-info-text' and contains(.,'Ваш хід в ')]
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Page Contains Element ${BTN_BET} 1m
Element Should Be Disabled ${BTN_BET}
${MINIMAL_BET} = Evaluate ${MINIMALSTEP} + ${AMOUNT}
Wait Until Page Contains Element //time[@class='spinner-time']
Page Should Contain Element ${NUMBER_INPUT}
Page Should Contain Element //div[contains(@class,'input-text bidder-input-text') and contains(span,'Ставка має бути від')]
Page Should Contain Element //b[@class='bidder-input-hint-currency' and contains(.,'${MINIMAL_BET}')]
Page Should Contain Element //div[@class='input-currency' and .='грн']
Page Should Not Contain Element ${BTN_BET_REJECT}
Input Text ${NUMBER_INPUT} 1
Click Button ${BTN_BET}
Check Attention MINIMAL_BET=${${AMOUNT} + ${MINIMALSTEP}}
Page Should Contain Element //input[@class='input-block' and @value="1.00"]
Press Keys ${NUMBER_INPUT} CTRL+a+BACKSPACE
Input Text ${NUMBER_INPUT} ${${MINIMALSTEP} + ${AMOUNT}}
Element Should Be Enabled ${BTN_BET}
Press Keys ${NUMBER_INPUT} ENTER
Accepted Bet ${${MINIMALSTEP} + ${AMOUNT}}
Page Should Contain Element ${REFRESH_BET}
Page Should Contain Element ${BTN_BET_REJECT}
Input Text ${NUMBER_INPUT} ${2 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${REFRESH_BET}
Accepted Bet ${2 * ${MINIMALSTEP} + ${AMOUNT}}
Switch Browser chrome_${WATCHER}
Wait Until Page Contains Element //span[@class='bidder-info-text' and contains(.,'До закінчення раунду 1')]
3. Відображення інформації в блоці Bid Change під час перiоду оголошення результатів
Wait Until Page Contains Element ${ANNOUNCEMENT_RESULTS} 2m
Switch Browser chrome_${WATCHER}
Element Should Not Be Visible //span[@class="bidder-info-text"]
Switch Browser chrome_${BIDDER_TOKEN[2]}
Page Should Not Contain Element ${BTN_BET}
Page Should Not Contain Element ${NUMBER_INPUT}
Markdown is supported
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