|
| 1 | +*** Settings *** |
| 2 | +Documentation Verify collection estimation scenarios |
| 3 | +Library SeleniumLibrary |
| 4 | +Resource ../../auth.steps.robot |
| 5 | +Resource ../../selenium.utils.robot |
| 6 | +Suite Setup Before Test Suite |
| 7 | +Suite Teardown Close Browser |
| 8 | +Force Tags collection estimation logic |
| 9 | + |
| 10 | +*** Test Cases *** |
| 11 | +Message should be shown when a collection is empty |
| 12 | + Go To ${SITE_URL}/collection/paid/estimation |
| 13 | + Element Text Should Be id=empty-collection-msg In this collection is no stamps |
| 14 | + |
| 15 | +Series with its price should be taken into account |
| 16 | + [Tags] unstable |
| 17 | + Go To ${SITE_URL}/series/1 |
| 18 | + Input Text id=paid-price 100 |
| 19 | + Select From List By Value id=paid-currency ${expectedCurrency} |
| 20 | + Submit Form id=add-series-form |
| 21 | + Go To ${SITE_URL}/collection/paid/estimation |
| 22 | + Table Cell Should Contain collection-estimation row=2 column=2 text=100.00 ${expectedCurrency} |
| 23 | + # TODO: use "Table Footer Should Contain" instead, when it will be fixed. |
| 24 | + # See https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/issues/88 |
| 25 | + Table Header Should Contain collection-estimation 100.00 ${expectedCurrency} |
| 26 | + |
| 27 | +Series without price should be shown but not taken into account |
| 28 | + [Tags] unstable |
| 29 | + Go To ${SITE_URL}/series/2 |
| 30 | + Submit Form id=add-series-form |
| 31 | + Go To ${SITE_URL}/collection/paid/estimation |
| 32 | + Table Cell Should Contain collection-estimation row=3 column=2 text=${EMPTY} |
| 33 | + # TODO: use "Table Footer Should Contain" instead, when it will be fixed. |
| 34 | + # See https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/issues/88 |
| 35 | + Table Header Should Contain collection-estimation 100.00 ${expectedCurrency} |
| 36 | + |
| 37 | +*** Keywords *** |
| 38 | +Before Test Suite |
| 39 | + @{currencies}= Create List USD EUR RUB CZK |
| 40 | + ${randomCurrency}= Evaluate random.choice(${currencies}) modules=random |
| 41 | + Set Suite Variable ${expectedCurrency} ${randomCurrency} |
| 42 | + Open Browser ${SITE_URL}/account/auth ${BROWSER} |
| 43 | + Register Keyword To Run On Failure Log Source |
| 44 | + Log In As login=paid password=test |
0 commit comments