Skip to content

Commit f722f82

Browse files
mukeshkphp-coder
authored andcommitted
test(series/search/validation.robot): add test to check that catalog number is specified.
Fix #1065
1 parent 5888a46 commit f722f82

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/main/webapp/WEB-INF/views/site/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ <h4 class="panel-title" th:text="#{t_in_db}">In our database</h4>
159159
<h4 class="panel-title" th:text="#{t_search_by_catalog}">Search by catalog</h4>
160160
</div>
161161
<div class="panel-body">
162-
<form method="get" action="../series/search_result.html" th:action="@{${SEARCH_SERIES_BY_CATALOG}}">
162+
<form id="search-series-form" method="get" action="../series/search_result.html" th:action="@{${SEARCH_SERIES_BY_CATALOG}}">
163163
<div class="form-group" th:classappend="${numberIsEmpty != null ? 'has-error' : ''}">
164164
<label for="catalogNumber" th:text="|#{t_number}:|">Number:</label>
165165
<input id="catalogNumber" name="catalogNumber" type="search" class="form-control"
166166
required="required" placeholder="Example: 999" th:placeholder="|#{t_example}: 999|" />
167167
<!--/*/
168-
<span th:if="${numberIsEmpty != null}" th:text="#{value.empty}" class="help-block">
168+
<span id="catalogNumber.errors" th:if="${numberIsEmpty != null}" th:text="#{value.empty}" class="help-block">
169169
Value must not be empty
170170
</span>
171171
/*/-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*** Settings ***
2+
Documentation Verify series search validation scenarios
3+
Library SeleniumLibrary
4+
Suite Setup Before Test Suite
5+
Suite Teardown Close Browser
6+
Force Tags series search validation
7+
8+
*** Test Cases ***
9+
Search the series with empty required field
10+
Submit Form id=search-series-form
11+
Element Text Should Be id=catalogNumber.errors Value must not be empty
12+
13+
14+
*** Keywords ***
15+
Before Test Suite
16+
Open Browser ${SITE_URL}/ ${BROWSER}
17+
Register Keyword To Run On Failure Log Source

0 commit comments

Comments
 (0)