Skip to content

Commit 16047f2

Browse files
committed
WhenAdminAddCategory.categoryName{En,Ru}WithForbiddenCharactersShouldBeRejected: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent 67bd1f5 commit 16047f2

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,6 @@ public void categoryNameRuWithAllowedCharactersShouldBeAccepted() {
8282
assertThat(page).field("nameRu").hasNoError();
8383
}
8484

85-
@Test(groups = "invalid", dependsOnGroups = "std")
86-
public void categoryNameEnWithForbiddenCharactersShouldBeRejected() {
87-
page.addCategory("S0m3+CategoryN_ame", TEST_CATEGORY_NAME_RU);
88-
89-
assertThat(page).field("name").hasError(tr("category-name-en.invalid"));
90-
}
91-
92-
@Test(groups = "invalid", dependsOnGroups = "std")
93-
public void categoryNameRuWithForbiddenCharactersShouldBeRejected() {
94-
page.addCategory(TEST_CATEGORY_NAME_EN, "Категория123");
95-
96-
assertThat(page).field("nameRu").hasError(tr("category-name-ru.invalid"));
97-
}
98-
9985
@Test(groups = "invalid", dependsOnGroups = "std")
10086
public void categoryNameEnShouldNotStartsFromHyphen() {
10187
page.addCategory("-test", TEST_CATEGORY_NAME_RU);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Create category 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 category with forbidden characters in name
29+
[Documentation] Verify validation of invalid name
30+
Input Text id=name S0m3+CategoryN_ame
31+
Input Text id=nameRu Категория_1+23
32+
Submit Form id=add-category-form
33+
Element Text Should Be id=name.errors Category name must consist only latin letters, hyphen or spaces
34+
Element Text Should Be id=nameRu.errors Category name must consist only Russian letters, hyphen or spaces
35+
2836
Create category with existing name
2937
[Documentation] Verify validation of non-unique name
3038
Input Text id=name Sport

0 commit comments

Comments
 (0)