Skip to content

Commit 68c04ae

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

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
@@ -109,20 +109,6 @@ public void categoryNameRuShouldNotEndsWithHyphen() {
109109

110110
assertThat(page).field("nameRu").hasError(tr("value.hyphen"));
111111
}
112-
113-
@Test(groups = "invalid", dependsOnGroups = "std")
114-
public void categoryNameEnShouldNotContainRepeatedHyphens() {
115-
page.addCategory("te--st", TEST_CATEGORY_NAME_RU);
116-
117-
assertThat(page).field("name").hasError(tr("value.repeating_hyphen"));
118-
}
119-
120-
@Test(groups = "invalid", dependsOnGroups = "std")
121-
public void categoryNameRuShouldNotContainRepeatedHyphens() {
122-
page.addCategory(TEST_CATEGORY_NAME_EN, "те--ст");
123-
124-
assertThat(page).field("nameRu").hasError(tr("value.repeating_hyphen"));
125-
}
126112

127113
@Test(groups = "misc", dependsOnGroups = "std")
128114
public void categoryNameEnShouldBeStripedFromLeadingAndTrailingSpaces() {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ Create category with forbidden characters in name
3333
Element Text Should Be id=name.errors Category name must consist only latin letters, hyphen or spaces
3434
Element Text Should Be id=nameRu.errors Category name must consist only Russian letters, hyphen or spaces
3535

36+
Create category with repeating hyphens in name
37+
[Documentation] Verify validation name with repeating hyphens
38+
Input Text id=name te--st
39+
Input Text id=nameRu те--ст
40+
Submit Form id=add-category-form
41+
Element Text Should Be id=name.errors Value must not contain repetition of hyphen
42+
Element Text Should Be id=nameRu.errors Value must not contain repetition of hyphen
43+
3644
Create category with existing name
3745
[Documentation] Verify validation of non-unique name
3846
Input Text id=name Sport

0 commit comments

Comments
 (0)