Skip to content

Commit a74ed4f

Browse files
committed
WhenAdminAddCategory.categoryName{En,Ru}ShouldNotStartsFromHyphen: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent 68c04ae commit a74ed4f

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 categoryNameEnShouldNotStartsFromHyphen() {
87-
page.addCategory("-test", TEST_CATEGORY_NAME_RU);
88-
89-
assertThat(page).field("name").hasError(tr("value.hyphen"));
90-
}
91-
92-
@Test(groups = "invalid", dependsOnGroups = "std")
93-
public void categoryNameRuShouldNotStartsFromHyphen() {
94-
page.addCategory(TEST_CATEGORY_NAME_EN, "-тест");
95-
96-
assertThat(page).field("nameRu").hasError(tr("value.hyphen"));
97-
}
98-
9985
@Test(groups = "invalid", dependsOnGroups = "std")
10086
public void categoryNameEnShouldNotEndsWithHyphen() {
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
@@ -41,6 +41,14 @@ Create category with repeating hyphens in name
4141
Element Text Should Be id=name.errors Value must not contain repetition of hyphen
4242
Element Text Should Be id=nameRu.errors Value must not contain repetition of hyphen
4343

44+
Create category with name that starts with hyphen
45+
[Documentation] Verify validation of name with leading hyphen
46+
Input Text id=name -test
47+
Input Text id=nameRu -тест
48+
Submit Form id=add-category-form
49+
Element Text Should Be id=name.errors Value must not start or end with hyphen
50+
Element Text Should Be id=nameRu.errors Value must not start or end with hyphen
51+
4452
Create category with existing name
4553
[Documentation] Verify validation of non-unique name
4654
Input Text id=name Sport

0 commit comments

Comments
 (0)