Skip to content

TravisCI: integration test is failing on MySQL with "Country already exists" error #633

Closed
@php-coder

Description

@php-coder

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.&lt;br&gt;&lt;br&gt;&lt;b&gt;Parameters:&lt;/b&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;url&lt;/b&gt;&amp;nbsp;The URL to open.&lt;br&gt;</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 &lt;b&gt;text&lt;/b&gt; 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 &lt;b&gt;text&lt;/b&gt; 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 &lt;b&gt;locator&lt;/b&gt;.&lt;br&gt;</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 &lt;b&gt;url&lt;/b&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Parameters:&lt;/b&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;url&lt;/b&gt;&amp;nbsp;The URL to verify.&lt;br&gt;&lt;br&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;`Location Should Contain`&lt;br&gt;</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.&lt;br&gt;</doc>
                <msg level="INFO" timestamp="20170904 17:55:19.545">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"/&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"/&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"/&gt;
    &lt;meta name="robots" content="noindex"/&gt;
    &lt;title&gt;
      My stamps: add country
    &lt;/title&gt;
    &lt;link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/&gt;
    &lt;link rel="stylesheet" href="/public/bootstrap/3.3.7/css/bootstrap.min.css"/&gt;
    &lt;link rel="stylesheet" href="https://cdn.rawgit.com/usrz/bootstrap-languages/3ac2a3d2b27ac43a471cd99e79d378a03b2c6b5f/languages.min.css"/&gt;
    &lt;link rel="stylesheet" href="/static/v0.3.5/styles/main.min.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div class="container-fluid"&gt;
      &lt;div class="row" id="header"&gt;
        &lt;div id="logo" class="col-sm-9 vcenter"&gt;
          &lt;a href="/"&gt;
            My stamps
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;!--

                                --&gt;        &lt;div class="col-sm-1 vcenter"&gt;
          &lt;span class="lang-xs" lang="ru"&gt;
          &lt;/span&gt;
          &lt;a href="?lang=ru" hreflang="ru"&gt;
            \xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;!--

                                --&gt;        &lt;div id="user_bar" class="col-sm-2 vcenter"&gt;
          &lt;ul class="list-unstyled"&gt;
            &lt;li&gt;
              &lt;i class="glyphicon glyphicon-user"&gt;
              &lt;/i&gt;
              &lt;a href="/collection/admin" title="Open my collection"&gt;
                Site Admin
              &lt;/a&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;form id="logout-form" method="post" action="/account/logout" class="no-margin"&gt;
                &lt;input type="hidden" name="_csrf" value="23de4012-456b-42a2-b305-f0fda2c42dfa"/&gt;
                &lt;i class="glyphicon glyphicon-share"&gt;
                &lt;/i&gt;
                \xc2\xa0
                &lt;input type="submit" value="Sign out" class="btn btn-link no-padding"/&gt;
              &lt;/form&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
        &lt;div id="content" class="col-sm-6 col-sm-offset-3"&gt;
          &lt;h3&gt;
            Add country
          &lt;/h3&gt;
          &lt;div class="hint text-center"&gt;
            &lt;small&gt;
              &lt;span class="hint_item"&gt;
                All fields marked by asterisk (
                &lt;span class="required_field"&gt;
                  *
                &lt;/span&gt;
                ) must be filled.
              &lt;/span&gt;
            &lt;/small&gt;
          &lt;/div&gt;
          &lt;form id="add-country-form" method="post" class="form-horizontal" action="/country/add"&gt;
            &lt;input type="hidden" name="_csrf" value="23de4012-456b-42a2-b305-f0fda2c42dfa"/&gt;
            &lt;div class="form-group"&gt;
              &lt;label for="name" class="control-label col-sm-4"&gt;

                                                                Name (in English)

                &lt;span class="required_field"&gt;
                  *
                &lt;/span&gt;
              &lt;/label&gt;
              &lt;div class="col-sm-5"&gt;
                &lt;input id="name" type="text" class="form-control" required="required" name="name" value="Russia"/&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="form-group has-error"&gt;
              &lt;label for="nameRu" class="control-label col-sm-4"&gt;

                                                                Name (in Russian)

              &lt;/label&gt;
              &lt;div class="col-sm-5"&gt;
                &lt;input id="nameRu" type="text" class="form-control" name="nameRu" value="\xd0\xa0\xd0\xbe\xd1\x81\xd1\x81\xd0\xb8\xd1\x8f"/&gt;
                &lt;span id="nameRu.errors" class="help-block"&gt;
                  Country already exists
                &lt;/span&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="form-group"&gt;
              &lt;div class="col-sm-offset-4 col-sm-5"&gt;
                &lt;input type="submit" class="btn btn-primary" value="Add"/&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
        &lt;footer class="col-sm-12 text-right"&gt;
          &lt;i class="glyphicon glyphicon-envelope"&gt;
          &lt;/i&gt;
          &lt;a href="mailto:slava.semushin@gmail.com" title="Write e-mail"&gt;
            Slava Semushin
          &lt;/a&gt;
          , 2009-2017

        &lt;/footer&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;!-- Placed at the end of the document so the pages load faster --&gt;    &lt;script src="/public/jquery/1.9.1/jquery.min.js"&gt;
    &lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
</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>

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions