Skip to content

Commit a7bfc12

Browse files
committed
WhenAdminAddCountry.countryName{En,Ru}ShouldNotEndsWithHyphen: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent 34b4c8c commit a7bfc12

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

src/test/java/ru/mystamps/web/tests/cases/WhenAdminAddCountry.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,6 @@ public void countryNameRuWithAllowedCharactersShouldBeAccepted() {
114114
assertThat(page).field("nameRu").hasNoError();
115115
}
116116

117-
@Test(groups = "invalid", dependsOnGroups = "std")
118-
public void countryNameEnShouldNotEndsWithHyphen() {
119-
page.addCountry("test-", TEST_COUNTRY_NAME_RU);
120-
121-
assertThat(page)
122-
.field("name")
123-
.hasError(tr("value.hyphen"));
124-
}
125-
126-
@Test(groups = "invalid", dependsOnGroups = "std")
127-
public void countryNameRuShouldNotEndsWithHyphen() {
128-
page.addCountry(TEST_COUNTRY_NAME_EN, "тест-");
129-
130-
assertThat(page)
131-
.field("nameRu")
132-
.hasError(tr("value.hyphen"));
133-
}
134-
135117
@Test(groups = "misc", dependsOnGroups = "std")
136118
public void countryNameEnShouldBeStripedFromLeadingAndTrailingSpaces() {
137119
page.addCountry(" t3st ", TEST_COUNTRY_NAME_RU);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ Create country with name that starts with hyphen
4949
Element Text Should Be id=name.errors Value must not start or end with hyphen
5050
Element Text Should Be id=nameRu.errors Value must not start or end with hyphen
5151

52+
Create country with name that ends with hyphen
53+
[Documentation] Verify validation of name with trailing hyphen
54+
Input Text id=name test-
55+
Input Text id=nameRu тест-
56+
Submit Form id=add-country-form
57+
Element Text Should Be id=name.errors Value must not start or end with hyphen
58+
Element Text Should Be id=nameRu.errors Value must not start or end with hyphen
59+
5260
*** Keywords ***
5361
Before Test Suite
5462
[Documentation] Open browsers, register fail hook and login as admin

0 commit comments

Comments
 (0)