File tree Expand file tree Collapse file tree 3 files changed +44
-5
lines changed
main/webapp/WEB-INF/views/collection Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,12 @@ <h3 class="text-center" th:text="#{t_collection_of(${ownerName})}">
67
67
</ h3 >
68
68
69
69
<!--/*/
70
- <p class="text-center" th:if="${#lists.isEmpty(seriesOfCollection)}" th:text="#{t_empty_collection}">
70
+ <p id="empty-series-of-collection" class="text-center" th:if="${#lists.isEmpty(seriesOfCollection)}" th:text="#{t_empty_collection}">
71
71
In this collection is no stamps
72
72
</p>
73
73
/*/-->
74
74
75
- < table class ="table table-hover " th:if ="${not #lists.isEmpty(seriesOfCollection)} ">
75
+ < table id =" paid-user-collection " class ="table table-hover " th:if ="${not #lists.isEmpty(seriesOfCollection)} ">
76
76
< thead >
77
77
< tr class ="active ">
78
78
< th th:text ="#{t_series} "> Series</ th >
Original file line number Diff line number Diff line change
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-series-of-collection 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
+ ${currency } = Select Random Option From List id=paid-currency True
20
+ Submit Form id=add-series-form
21
+ Go To ${SITE_URL } /collection/paid/estimation
22
+ ${amountInText } = Catenate 100.00 ${currency }
23
+ Table Header Should Contain paid-user-collection ${amountInText }
24
+
25
+ Series without price should be shown but not taken into account
26
+ [Tags] unstable
27
+ Go To ${SITE_URL } /series/2
28
+ Submit Form id=add-series-form
29
+ Go To ${SITE_URL } /collection/paid/estimation
30
+ Table Header Should Contain paid-user-collection 100.00
31
+
32
+ *** Keywords ***
33
+ Before Test Suite
34
+ Open Browser ${SITE_URL } /account/auth ${BROWSER }
35
+ Register Keyword To Run On Failure Log Source
36
+ Log In As login=paid password=test
Original file line number Diff line number Diff line change 1
1
*** Settings ***
2
2
Documentation Keywords (and workarounds) that are missing in the SeleniumLibrary for Robot Framework
3
+ Library Collections
3
4
4
5
*** Keywords ***
5
6
Element Text Should Match Regexp
@@ -69,8 +70,10 @@ Wait Until Element Value Is
69
70
70
71
Select Random Option From List
71
72
[Documentation] Choose a random option from a select element
72
- [Arguments] ${locator }
73
+ [Arguments] ${locator } ${ ignoreEmptyOption } =False
73
74
${options } = Get List Items ${locator }
75
+ Run Keyword If ${ignoreEmptyOption } Remove Values From List ${options } ${EMPTY }
74
76
${size } = Get Length ${options }
75
- ${randomIndex } = Evaluate random.randint(0, ${size } -1 ) modules=random
76
- Select From List By Index ${locator } ${randomIndex }
77
+ ${randomItemIndex } = Evaluate random.randint(0, ${size } -1 ) modules=random
78
+ Select From List By Label ${locator } @{options } [${randomItemIndex } ]
79
+ [Return] @{options } [${randomItemIndex } ]
You can’t perform that action at this time.
0 commit comments