Skip to content

Commit d14bb06

Browse files
committed
Fix integration tests under Windows.
Prior this change they were failing because of different line endings in a message.
1 parent 01dc673 commit d14bb06

File tree

6 files changed

+32
-18
lines changed

6 files changed

+32
-18
lines changed

src/test/robotframework/category/access.robot

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Settings ***
22
Documentation Verify access to category related pages (including non-existing)
33
Library Selenium2Library
4+
Resource ../selenium.utils.robot
45
Suite Setup Before Test Suite
56
Suite Teardown After Test Suite
67
Force Tags category access
@@ -12,9 +13,9 @@ Anonymous user cannot create category
1213
Element Text Should Be id=error-msg Forbidden
1314

1415
Opening a page of non-existing category show an error
15-
Go To ${SITE_URL}/category/category-404-error-test
16-
Element Text Should Be id=error-code 404
17-
Element Text Should Be id=error-msg Requested page${\n}not found
16+
Go To ${SITE_URL}/category/category-404-error-test
17+
Element Text Should Be id=error-code 404
18+
Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found
1819

1920
*** Keywords ***
2021
Before Test Suite

src/test/robotframework/category/creation/logic.robot

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ Documentation Verify category creation scenarios
33
Library Collections
44
Library Selenium2Library
55
Resource ../../auth.steps.robot
6+
Resource ../../selenium.utils.robot
67
Suite Setup Before Test Suite
78
Suite Teardown After Test Suite
89
Test Setup Before Test
910
Force Tags category logic
1011

1112
*** Test Cases ***
1213
Create category with name in English (fill only mandatory fields)
13-
Input Text id=name Cars
14-
Submit Form id=add-category-form
15-
Location Should Be ${SITE_URL}/category/cars
16-
Element Text Should Be id=page-header Cars
17-
Element Text Should Be id=msg-success Category has been added.${\n}Now you could proceed with creating series.
18-
Go To ${SITE_URL}/series/add
19-
${availableCategories}= Get List Items id=category
20-
List Should Contain Value ${availableCategories} Cars
14+
Input Text id=name Cars
15+
Submit Form id=add-category-form
16+
Location Should Be ${SITE_URL}/category/cars
17+
Element Text Should Be id=page-header Cars
18+
Element Text Should Match Regexp id=msg-success Category has been added\.[\\n\\r]+Now you could proceed with creating series\.
19+
Go To ${SITE_URL}/series/add
20+
${availableCategories}= Get List Items id=category
21+
List Should Contain Value ${availableCategories} Cars
2122
# TODO: verify that after changing language, header will be in English
2223

2324
Create category with name in English and Russian

src/test/robotframework/country/access.robot

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Settings ***
22
Documentation Verify access to country related pages (including non-existing)
33
Library Selenium2Library
4+
Resource ../selenium.utils.robot
45
Suite Setup Before Test Suite
56
Suite Teardown After Test Suite
67
Force Tags country access
@@ -12,9 +13,9 @@ Anonymous user cannot create country
1213
Element Text Should Be id=error-msg Forbidden
1314

1415
Opening a page of non-existing country show an error
15-
Go To ${SITE_URL}/country/country-404-error-test
16-
Element Text Should Be id=error-code 404
17-
Element Text Should Be id=error-msg Requested page${\n}not found
16+
Go To ${SITE_URL}/country/country-404-error-test
17+
Element Text Should Be id=error-code 404
18+
Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found
1819

1920
*** Keywords ***
2021
Before Test Suite

src/test/robotframework/country/creation/logic.robot

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Documentation Verify country creation scenarios
33
Library Selenium2Library
44
Resource ../../auth.steps.robot
5+
Resource ../../selenium.utils.robot
56
Suite Setup Before Test Suite
67
Suite Teardown After Test Suite
78
Test Setup Before Test
@@ -14,7 +15,7 @@ Create country with name in English (fill only mandatory fields)
1415
Submit Form id=add-country-form
1516
Location Should Be ${SITE_URL}/country/germany
1617
Element Text Should Be id=page-header Stamps of Germany
17-
Element Text Should Be id=msg-success Country has been added.${\n}Now you could proceed with creating series.
18+
Element Text Should Match Regexp id=msg-success Country has been added\.[\\n\\r]+Now you could proceed with creating series\.
1819
Go To ${SITE_URL}/series/add
1920
Country Field Should Have Option Germany
2021

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*** Settings ***
2+
Documentation Keywords (and workarounds) that are missing in the SeleniumLibrary for Robot Framework
3+
4+
*** Keywords ***
5+
Element Text Should Match Regexp
6+
[Documentation] Verify the text of the element identified by locator matches the given pattern
7+
[Arguments] ${locator} ${regexp}
8+
${text}= Get Text ${locator}
9+
Should Match Regexp ${text} ${regexp}

src/test/robotframework/series/access.robot

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Settings ***
22
Documentation Verify access to series related pages (including non-existing)
33
Library Selenium2Library
4+
Resource ../selenium.utils.robot
45
Suite Setup Before Test Suite
56
Suite Teardown After Test Suite
67
Force Tags series access
@@ -12,9 +13,9 @@ Anonymous user cannot create series
1213
Element Text Should Be id=error-msg Forbidden
1314

1415
Opening a page of non-existing series show an error
15-
Go To ${SITE_URL}/series/999
16-
Element Text Should Be id=error-code 404
17-
Element Text Should Be id=error-msg Requested page${\n}not found
16+
Go To ${SITE_URL}/series/999
17+
Element Text Should Be id=error-code 404
18+
Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found
1819

1920
*** Keywords ***
2021
Before Test Suite

0 commit comments

Comments
 (0)