Closed
Description
Test Create country with name in English and Russian
fail with error "Country already exists" in field nameRu
:
<test name="Create country with name in English and Russian" id="s1-s2-s2-s1-t2">
<kw type="setup" name="Before Test">
<doc>Open create country page</doc>
<kw library="Selenium2Library" name="Go To">
<doc>Navigates the active browser instance to the provided URL.<br><br><b>Parameters:</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>url</b>&nbsp;The URL to open.<br></doc>
<arguments>
<arg>${SITE_URL}/country/add</arg>
</arguments>
<msg level="INFO" timestamp="20170904 17:55:18.870">Opening url 'http://127.0.0.1:8080/country/add'</msg>
<status endtime="20170904 17:55:19.123" starttime="20170904 17:55:18.867" status="PASS"/>
</kw>
<status endtime="20170904 17:55:19.124" starttime="20170904 17:55:18.865" status="PASS"/>
</kw>
<kw library="Selenium2Library" name="Input Text">
<doc>Types the given <b>text</b> into the text field identified by</doc>
<arguments>
<arg>id=name</arg>
<arg>Russia</arg>
</arguments>
<msg level="INFO" timestamp="20170904 17:55:19.133">Typing text 'Russia' into text field 'id=name'</msg>
<status endtime="20170904 17:55:19.169" starttime="20170904 17:55:19.125" status="PASS"/>
</kw>
<kw library="Selenium2Library" name="Input Text">
<doc>Types the given <b>text</b> into the text field identified by</doc>
<arguments>
<arg>id=nameRu</arg>
<arg>Россия</arg>
</arguments>
<msg level="INFO" timestamp="20170904 17:55:19.173">Typing text '??????' into text field 'id=nameRu'</msg>
<status endtime="20170904 17:55:19.202" starttime="20170904 17:55:19.170" status="PASS"/>
</kw>
<kw library="Selenium2Library" name="Submit Form">
<doc>Submit the form identified by <b>locator</b>.<br></doc>
<arguments>
<arg>id=add-country-form</arg>
</arguments>
<msg level="INFO" timestamp="20170904 17:55:19.206">Submitting form 'id=add-country-form'.</msg>
<status endtime="20170904 17:55:19.513" starttime="20170904 17:55:19.203" status="PASS"/>
</kw>
<kw library="Selenium2Library" name="Location Should Be">
<doc>Verify the current page URL is exactly <b>url</b>.<br><br><b>Parameters:</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>url</b>&nbsp;The URL to verify.<br><br><b>See Also:</b><br>&nbsp;&nbsp;&nbsp;&nbsp;`Location Should Contain`<br></doc>
<arguments>
<arg>${SITE_URL}/country/russia</arg>
</arguments>
<kw library="Selenium2Library" name="Log Source">
<doc>Logs and returns the entire html source of the current page or frame.<br></doc>
<msg level="INFO" timestamp="20170904 17:55:19.545"><?xml version="1.0" encoding="UTF-8"?>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="robots" content="noindex"/>
<title>
My stamps: add country
</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
<link rel="stylesheet" href="/public/bootstrap/3.3.7/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://cdn.rawgit.com/usrz/bootstrap-languages/3ac2a3d2b27ac43a471cd99e79d378a03b2c6b5f/languages.min.css"/>
<link rel="stylesheet" href="/static/v0.3.5/styles/main.min.css"/>
</head>
<body>
<div class="container-fluid">
<div class="row" id="header">
<div id="logo" class="col-sm-9 vcenter">
<a href="/">
My stamps
</a>
</div>
<!--
--> <div class="col-sm-1 vcenter">
<span class="lang-xs" lang="ru">
</span>
<a href="?lang=ru" hreflang="ru">
\xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9
</a>
</div>
<!--
--> <div id="user_bar" class="col-sm-2 vcenter">
<ul class="list-unstyled">
<li>
<i class="glyphicon glyphicon-user">
</i>
<a href="/collection/admin" title="Open my collection">
Site Admin
</a>
</li>
<li>
<form id="logout-form" method="post" action="/account/logout" class="no-margin">
<input type="hidden" name="_csrf" value="23de4012-456b-42a2-b305-f0fda2c42dfa"/>
<i class="glyphicon glyphicon-share">
</i>
\xc2\xa0
<input type="submit" value="Sign out" class="btn btn-link no-padding"/>
</form>
</li>
</ul>
</div>
</div>
<div class="row">
<div id="content" class="col-sm-6 col-sm-offset-3">
<h3>
Add country
</h3>
<div class="hint text-center">
<small>
<span class="hint_item">
All fields marked by asterisk (
<span class="required_field">
*
</span>
) must be filled.
</span>
</small>
</div>
<form id="add-country-form" method="post" class="form-horizontal" action="/country/add">
<input type="hidden" name="_csrf" value="23de4012-456b-42a2-b305-f0fda2c42dfa"/>
<div class="form-group">
<label for="name" class="control-label col-sm-4">
Name (in English)
<span class="required_field">
*
</span>
</label>
<div class="col-sm-5">
<input id="name" type="text" class="form-control" required="required" name="name" value="Russia"/>
</div>
</div>
<div class="form-group has-error">
<label for="nameRu" class="control-label col-sm-4">
Name (in Russian)
</label>
<div class="col-sm-5">
<input id="nameRu" type="text" class="form-control" name="nameRu" value="\xd0\xa0\xd0\xbe\xd1\x81\xd1\x81\xd0\xb8\xd1\x8f"/>
<span id="nameRu.errors" class="help-block">
Country already exists
</span>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-5">
<input type="submit" class="btn btn-primary" value="Add"/>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<footer class="col-sm-12 text-right">
<i class="glyphicon glyphicon-envelope">
</i>
<a href="mailto:slava.semushin@gmail.com" title="Write e-mail">
Slava Semushin
</a>
, 2009-2017
</footer>
</div>
</div>
<!-- Placed at the end of the document so the pages load faster --> <script src="/public/jquery/1.9.1/jquery.min.js">
</script>
</body>
</html>
</msg>
<status endtime="20170904 17:55:19.548" starttime="20170904 17:55:19.524" status="PASS"/>
</kw>
<msg level="FAIL" timestamp="20170904 17:55:19.565">Location should have been 'http://127.0.0.1:8080/country/russia', but was 'http://127.0.0.1:8080/country/add'</msg>
<status endtime="20170904 17:55:19.565" starttime="20170904 17:55:19.514" status="FAIL"/>
</kw>
<doc>Verify creation of country by specifying names in 2 languages</doc>
<tags>
<tag>country</tag>
<tag>logic</tag>
</tags>
<status critical="yes" endtime="20170904 17:55:19.567" starttime="20170904 17:55:18.862" status="FAIL">Location should have been 'http://127.0.0.1:8080/country/russia', but was 'http://127.0.0.1:8080/country/add'</status>
</test>