Skip to content

Commit d7bed7c

Browse files
mukeshkphp-coder
authored andcommitted
test(series/search/logic.robot): add test for the empty search results.
Fix #1066
1 parent eb763ee commit d7bed7c

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

src/main/webapp/WEB-INF/views/series/search_result.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h3 class="text-center" th:text="${#strings.capitalize(search_results)}">
7070
</h3>
7171

7272
<!--/*/
73-
<p class="text-center" th:if="${#lists.isEmpty(searchResults)}" th:text="#{t_no_series_found}">
73+
<p id="no-series-found" class="text-center" th:if="${#lists.isEmpty(searchResults)}" th:text="#{t_no_series_found}">
7474
No series found
7575
</p>
7676
/*/-->

src/test/robotframework/selenium.utils.robot

+8
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,11 @@ Wait Until Element Value Is
6666
... ${text}
6767
... ';
6868
Wait For Condition ${elemHasValue}
69+
70+
Select Random Option From List
71+
[Documentation] Choose a random option from a select element
72+
[Arguments] ${locator}
73+
${options}= Get List Items ${locator}
74+
${size}= Get Length ${options}
75+
${randomIndex}= Evaluate random.randint(0, ${size}-1) modules=random
76+
Select From List By Index ${locator} ${randomIndex}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*** Settings ***
2+
Documentation Verify series search scenarios
3+
Library SeleniumLibrary
4+
Resource ../../selenium.utils.robot
5+
Suite Setup Before Test Suite
6+
Suite Teardown Close Browser
7+
Force Tags series search logic
8+
9+
*** Test Cases ***
10+
Search series by non-existing catalog number
11+
Input Text id=catalogNumber 888
12+
Select Random Option From List id=catalogName
13+
Submit Form id=search-series-form
14+
Element Text Should Be id=no-series-found No series found
15+
16+
*** Keywords ***
17+
Before Test Suite
18+
Open Browser ${SITE_URL}/ ${BROWSER}
19+
Register Keyword To Run On Failure Log Source

0 commit comments

Comments
 (0)