Skip to content

Commit eb4e7e4

Browse files
mukeshkphp-coder
authored andcommitted
test(site/change-lang): integration tests for switching the language
Fix #214
1 parent faf5474 commit eb4e7e4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
th:with="lang=${#locale.language == 'en' ? 'ru' : 'en'},langName=${#locale.language == 'en' ? 'Русский' : 'English'}">
2626
<span class="lang-xs" lang="ru"
2727
th:lang="${lang}"></span>
28-
<a href="javascript:void(0)" hreflang="ru"
28+
<a id="change-lang-link" href="javascript:void(0)" hreflang="ru"
2929
th:href="|?lang=${lang}|" th:hreflang="${lang}" th:text="${langName}">Русский</a>
3030
</div><!--
3131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*** Settings ***
2+
Documentation Verify change language scenario
3+
Library SeleniumLibrary
4+
Suite Setup Before Test Suite
5+
Suite Teardown Close Browser
6+
Force Tags main-page lang logic
7+
8+
*** Test Cases ***
9+
Language should be changed after switching language
10+
Element Text Should Be id=logo My stamps
11+
Click Link id=change-lang-link
12+
Element Text Should Be id=logo Мои марки
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)