Skip to content

Commit 0ffb97a

Browse files
committed
WhenAdminAddCountry.countryName{En,Ru}WithForbiddenCharactersShouldBeRejected: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent b461334 commit 0ffb97a

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 countryNameEnWithForbiddenCharactersShouldBeRejected() {
119-
page.addCountry("S0m3+CountryN_ame", TEST_COUNTRY_NAME_RU);
120-
121-
assertThat(page)
122-
.field("name")
123-
.hasError(tr("country-name-en.invalid"));
124-
}
125-
126-
@Test(groups = "invalid", dependsOnGroups = "std")
127-
public void countryNameRuWithForbiddenCharactersShouldBeRejected() {
128-
page.addCountry(TEST_COUNTRY_NAME_EN, "Нек0торо3+наз_вание");
129-
130-
assertThat(page)
131-
.field("nameRu")
132-
.hasError(tr("country-name-ru.invalid"));
133-
}
134-
135117
@Test(groups = "invalid", dependsOnGroups = "std")
136118
public void countryNameEnShouldNotStartsFromHyphen() {
137119
page.addCountry("-test", 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
@@ -25,6 +25,14 @@ Create country with too long name
2525
Element Text Should Be id=name.errors Value is greater than allowable maximum of 50 characters
2626
Element Text Should Be id=nameRu.errors Value is greater than allowable maximum of 50 characters
2727

28+
Create country with forbidden characters in name
29+
[Documentation] Verify validation of invalid name
30+
Input Text id=name S0m3+CountryN_ame
31+
Input Text id=nameRu Нек0торо3+наз_вание
32+
Submit Form id=add-country-form
33+
Element Text Should Be id=name.errors Country name must consist only latin letters, hyphen or spaces
34+
Element Text Should Be id=nameRu.errors Country name must consist only Russian letters, hyphen or spaces
35+
2836
*** Keywords ***
2937
Before Test Suite
3038
[Documentation] Open browsers, register fail hook and login as admin

0 commit comments

Comments
 (0)