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

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

Check if details block displaying correctly on all auction stages
parent 22087968
Pipeline #20818 passed with stages
in 42 minutes and 6 seconds
*** Settings ***
Documentation 5.Функціональні особливості відображення блоків модулю аукціону
... Блок Details
... https://confluence-sale.prozorro.org/pages/viewpage.action?pageId=60950735#id-ТестуванняМАEnglish-CBD3-TE-MA-UC-05-05
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 ***
Початок аукціону та перевірка стану
Post Now ${AUCTION_NAME}
Check Action Status active_auction
Get Requests
${RESP} = Get Request and return resp By ${ID} ${BIDDER_TOKEN[0]}
Status Should Be 200 ${RESP}
${AUCTION_ID} = Get From Dictionary ${resp.json()} auctionId
Set Suite Variable \${AUCTION_ID}
${AUCTION_URL} = Get From Dictionary ${resp.json()} auctionUrl
Set Suite Variable \${AUCTION_URL}
${TITLE} = Get From Dictionary ${resp.json()['title']} uk_UA
Set Suite Variable \${TITLE}
${DESCRIPTION} = Get From Dictionary ${resp.json()['description']} uk_UA
Set Suite Variable \${DESCRIPTION}
${SELLING_ENTITY} = Get From Dictionary ${resp.json()['sellingEntity']['name']} uk_UA
Set Suite Variable \${SELLING_ENTITY}
${STARTING_VALUE} = Get From Dictionary ${resp.json()['value']} amount
Set Suite Variable \${STARTING_VALUE}
${ITEMS_DESCRIPTION} = Get From Dictionary ${resp.json()['items'][0]['description']} uk_UA
Set Suite Variable \${ITEMS_DESCRIPTION}
${QUANTITY} = Get From Dictionary ${resp.json()['items'][0]} quantity
${QUANTITY} = Convert To Integer ${QUANTITY}
Set Suite Variable \${QUANTITY}
${STREET_ADDRESS} = Get From Dictionary ${resp.json()['items'][0]['address']['streetAddress']} uk_UA
Set Suite Variable \${STREET_ADDRESS}
${LOCALITY} = Get From Dictionary ${resp.json()['items'][0]['address']['locality']} uk_UA
Set Suite Variable \${LOCALITY}
${REGION} = Get From Dictionary ${resp.json()['items'][0]['address']['region']} uk_UA
Set Suite Variable \${REGION}
${POSTAL_CODE} = Get From Dictionary ${resp.json()['items'][0]['address']} postalCode
Set Suite Variable \${POSTAL_CODE}
${COUNTRY} = Get From Dictionary ${resp.json()['items'][0]['address']['countryName']} uk_UA
Set Suite Variable \${COUNTRY}
1. Перевiрка вiдображення блоку Details пiд час паузи перед 1 раундом
Open Browser Maximized about:blank ${BIDDER_TOKEN[0]}
${BIDDER_URL_1} = Get Request and return participationUrl By ${ID} ${BIDDER_TOKEN[0]}
Allow Terms ${BIDDER_URL_1}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
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}
Check Details Block Displaying Correctly
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}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Open Browser Maximized ${AUCTION_URL} ${WATCHER}
Check Details Block Displaying Correctly
Page Should Not Contain Element id:participant-id
Page Should Not Contain Element id:participant-ip
2. Після натискання на кнопку 'приховати деталi' поле data.title згортається, блок Details з полями приховується, вікно повертається до початкових розмірів
Wait Until Page Contains Element //i[contains(@class, "header-link")]
Scroll Element Into View //i[contains(@class, "header-link")]
Click Element //i[contains(@class, "header-link")]
Sleep 1s
Element Should Not Be Visible //div[@class='auction-details-item' and .='${TITLE}']
Element Should Not Be Visible //li[@class='auction-details-list-item' and contains(span, 'Організатор') and contains(.,':') and contains(., '${SELLING_ENTITY}')]
Element Should Not Be Visible //li[@class='auction-details-list-item' and contains(span, 'Крок аукціону') and contains(.,':') and contains(., '${MINIMAL_STEP}')]
Element Should Not Be Visible //div[@class='auction-details-text-grey' and .='${DESCRIPTION}']
Element Should Not Be Visible //h3[@class='auction-details-label' and .='${ITEMS_DESCRIPTION}']
Element Should Not Be Visible //li[@class='auction-details-list-item' and contains(span, 'Кількість') and contains(.,':') and contains(., '${QUANTITY}')]
Element Should Not Be Visible
... //li[@class='auction-details-list-item' and contains(span, 'Адреса') and contains(.,':') and contains(., '${STREET_ADDRESS}')and contains(., '${LOCALITY}')]
Element Should Not Be Visible
... //li[@class='auction-details-list-item' and contains(span, 'Адреса') and contains(., '${REGION}') and contains(., '${POSTAL_CODE}') and contains(., '${COUNTRY}')]
3. Перевiрка вiдображення блоку Details пiд час раунду 1
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${2 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${2 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${WATCHER}
Check Details Block Displaying Correctly
Page Should Not Contain Element id:participant-id
Page Should Not Contain Element id:participant-ip
4. Перевiрка вiдображення блоку Details пiд час раунду 2
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${3 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${3 * ${MINIMALSTEP} + ${AMOUNT}}
Input Text ${NUMBER_INPUT} ${4 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${REFRESH_BET}
Accepted Bet ${4 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${5 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${5 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${6 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${6 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${WATCHER}
Check Details Block Displaying Correctly
Page Should Not Contain Element id:participant-id
Page Should Not Contain Element id:participant-ip
5. Перевiрка вiдображення блоку Details пiд час раунду 3
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${7 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${7 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${8 * ${MINIMALSTEP} + ${AMOUNT}}
Click Button ${BTN_BET}
Accepted Bet ${8 * ${MINIMALSTEP} + ${AMOUNT}}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${9 * ${MINIMALSTEP} + ${AMOUNT} * 100}
Click Button ${BTN_BET}
Wait Until Element Is Visible ${MORE_THEN_10_TIME} 30s
Wait Until Element Is Visible ${BTN_ACCEPT_BET} 30s
Click Button ${BTN_ACCEPT_BET}
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Switch Browser chrome_${WATCHER}
Check Details Block Displaying Correctly
Page Should Not Contain Element id:participant-id
Page Should Not Contain Element id:participant-ip
*** Keywords ***
Check Details Block Displaying Correctly
Wait Until Page Contains Element //i[@class='link link-details' and .='детальніше про аукціон']
Click Element //i[@class='link link-details' and .='детальніше про аукціон']
Page Should Contain Element //a[@class='header-id' and .='${AUCTION_ID}']
Page Should Contain Element //div[@class='auction-details-item' and .='${TITLE}']
Page Should Contain Element //li[@class='auction-details-list-item' and contains(span, 'Організатор') and contains(.,':') and contains(., '${SELLING_ENTITY}')]
Wait Until Element Is Visible //li[@class='auction-details-list-item' and contains(span, 'Початкова ціна') and contains(., ':')]
${EXPECTED_STARTING_VALUE} = Get Text //li[@class='auction-details-list-item' and contains(span, 'Початкова ціна') and contains(., ':')]
${EXPECTED_STARTING_VALUE} = Remove String Using Regexp ${EXPECTED_STARTING_VALUE} [^.0-9]
${EXPECTED_STARTING_VALUE} = Convert To Number ${EXPECTED_STARTING_VALUE}
Should Be Equal As Numbers ${EXPECTED_STARTING_VALUE} ${STARTING_VALUE}
Page Should Contain Element //li[@class='auction-details-list-item' and contains(span, 'Крок аукціону') and contains(.,':') and contains(., '${MINIMAL_STEP}')]
Page Should Contain Element //div[@class='auction-details-text-grey' and .='${DESCRIPTION}']
Page Should Contain Element //h3[@class='auction-details-label' and .='${ITEMS_DESCRIPTION}']
Page Should Contain Element //li[@class='auction-details-list-item' and contains(span, 'Кількість') and contains(.,':') and contains(., '${QUANTITY}')]
Page Should Contain Element
... //li[@class='auction-details-list-item' and contains(span, 'Адреса') and contains(.,':') and contains(., '${STREET_ADDRESS}')and contains(., '${LOCALITY}')]
Page Should Contain Element
... //li[@class='auction-details-list-item' and contains(span, 'Адреса') and contains(., '${REGION}') and contains(., '${POSTAL_CODE}') and contains(., '${COUNTRY}')]
\ 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