Commit 343724da authored by Oleg Kachur's avatar Oleg Kachur 👽
Browse files

Refactor resolution and UC-05-05

parent 87f82b72
Pipeline #23018 passed with stages
in 32 minutes and 39 seconds
......@@ -24,7 +24,10 @@ Check For Pass Before
Open Browser Maximized
[Arguments] ${URL} ${BIDDER_TOKEN}=None
${OPTIONS} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
${RESOLUTION} = Evaluate f"window-size=1920,1080"
Call Method ${OPTIONS} add_argument start-maximized
Call Method ${OPTIONS} add_argument ${RESOLUTION}
Log ${OPTIONS}
Open Browser ${URL} browser=${BROWSER} alias=chrome_${BIDDER_TOKEN} remote_url=${REMOTE_URL}
... options=${OPTIONS}
......@@ -88,13 +91,13 @@ Check Action Results For
Should Be Equal As Strings ${CHECK_AMOUNT} ${AMOUNT}
Accepted Bet
#Verify bid
Accepted Bet
[Arguments] ${CHECKED_BET}
Wait Until Element Is Visible
Wait Until Element Is Visible
... //div[@class="bidder-accepted"]/span[contains(normalize-space(.), concat("Ставку прийнято", ": ", "${CHECKED_BET}.00"))]
... 30s
Check Attention
[Arguments] ${MINIMAL_BET}
${ATTENTION} = Catenate
......
*** Settings ***
Documentation 5.Функціональні особливості відображення блоків модулю аукціону
Documentation 5.Функціональні особливості відображення блоків модулю аукціону
... Блок Details
... https://confluence-sale.prozorro.org/pages/viewpage.action?pageId=60950735#id-ТестуванняМАEnglish-CBD3-TE-MA-UC-05-05
......@@ -10,10 +10,10 @@ 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
Suite Teardown Run Keywords Delete All Sessions Close All Browsers
*** Variables ***
${AUCTION_NAME} timber-english-initial-auction
${AUCTION_NAME} timber-english-initial-auction
*** Test Cases ***
......@@ -51,27 +51,38 @@ Get Requests
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
${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}
Log ${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}
Log ${BIDDER_URL_2}
Set Suite Variable \${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]}
Log ${BIDDER_URL_3}
Allow Terms ${BIDDER_URL_3}
Set Suite Variable \${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
......@@ -89,130 +100,168 @@ Get Requests
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
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}}
Wait Until Element Is Visible //li[@class='steps-list-item is-current' and contains(., "Раунд 1")] 30s
# Ordering step 1
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Element Is Visible ${BTN_BET} 15s
${BID_1} = Evaluate ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_1}
Click Button ${BTN_BET}
Accepted Bet ${${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_1}
Scroll To Details
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Scroll To Bottom
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${2 * ${MINIMALSTEP} + ${AMOUNT}}
# Ordering step 2
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 15s
${BID_2} = Evaluate 2 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_2}
Click Button ${BTN_BET}
Accepted Bet ${2 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_2}
Scroll To Details
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
Scroll To Bottom
Perform Watcher Check
4. Перевiрка вiдображення блоку Details пiд час раунду 2
Wait Until Element Is Visible //li[@class='steps-list-item is-current' and contains(., "Раунд 2")] 30s
Switch Browser chrome_${BIDDER_TOKEN[2]}
Capture Page Screenshot
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${3 * ${MINIMALSTEP} + ${AMOUNT}}
${BID_3} = Evaluate 3 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_3}
Click Button ${BTN_BET}
Accepted Bet ${3 * ${MINIMALSTEP} + ${AMOUNT}}
Input Text ${NUMBER_INPUT} ${4 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_3}
${BID_4} = Evaluate 4 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_4}
Click Button ${REFRESH_BET}
Accepted Bet ${4 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_4}
Scroll To Details
Check Details Block Displaying Correctly
Page Should Contain Element id:participant-id
Page Should Contain Element id:participant-ip
Scroll To Bottom
Switch Browser chrome_${BIDDER_TOKEN[1]}
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${5 * ${MINIMALSTEP} + ${AMOUNT}}
${BID_5} = Evaluate 5 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_5}
Click Button ${BTN_BET}
Accepted Bet ${5 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_5}
Scroll To Details
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]}
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${6 * ${MINIMALSTEP} + ${AMOUNT}}
${BID_6} = Evaluate 6 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_6}
Click Button ${BTN_BET}
Accepted Bet ${6 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_6}
Scroll To Details
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
Perform Watcher Check
5. Перевiрка вiдображення блоку Details пiд час раунду 3
Wait Until Element Is Visible //li[@class='steps-list-item is-current' and contains(., "Раунд 3")] 30s
Switch Browser chrome_${BIDDER_TOKEN[2]}
Switch Browser chrome_${BIDDER_TOKEN[0]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${7 * ${MINIMALSTEP} + ${AMOUNT}}
${BID_9} = Evaluate 9 * ${MINIMALSTEP} + ${AMOUNT} * 100
Input Text ${NUMBER_INPUT} ${BID_9}
Click Button ${BTN_BET}
Accepted Bet ${7 * ${MINIMALSTEP} + ${AMOUNT}}
Wait Until Element Is Visible ${MORE_THEN_10_TIME} 30s
Wait Until Element Is Visible ${BTN_ACCEPT_BET} 30s
Click Button ${BTN_ACCEPT_BET}
Scroll To Details
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]}
Switch Browser chrome_${BIDDER_TOKEN[2]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${8 * ${MINIMALSTEP} + ${AMOUNT}}
${BID_7} = Evaluate 7 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_7}
Click Button ${BTN_BET}
Accepted Bet ${8 * ${MINIMALSTEP} + ${AMOUNT}}
Accepted Bet ${BID_7}
Scroll To Details
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]}
Switch Browser chrome_${BIDDER_TOKEN[1]}
Wait Until Element Is Visible ${BTN_BET} 30s
Input Text ${NUMBER_INPUT} ${9 * ${MINIMALSTEP} + ${AMOUNT} * 100}
${BID_8} = Evaluate 7 * ${MINIMALSTEP} + ${AMOUNT}
Input Text ${NUMBER_INPUT} ${BID_8}
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}
Accepted Bet ${BID_8}
Scroll To Details
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
Perform Watcher Check
*** Keywords ***
Scroll To Details
Execute Javascript document.getElementById("details-block-link").scrollIntoView();
Scroll To Bottom
Execute Javascript document.getElementById("copyright").scrollIntoView();
Check Details Block Displaying Correctly
Wait Until Page Contains Element //i[@class='link link-details' and .='детальніше про аукціон']
Click Element //i[@class='link link-details' and .='детальніше про аукціон']
Wait Until Page Contains Element id:details-block-link
Click Element id:details-block-link
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} = 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
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
... //li[@class='auction-details-list-item' and contains(span, 'Адреса') and contains(., '${REGION}') and contains(., '${POSTAL_CODE}') and contains(., '${COUNTRY}')]
Perform Watcher Check
Switch Browser chrome_${WATCHER}
Scroll To Details
Check Details Block Displaying Correctly
Page Should Not Contain Element id:participant-id
Page Should Not Contain Element id:participant-ip
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