Skip to content

Commit 5d91d24

Browse files
committed
WhenAdminAddCategory.categoryName{En,Ru}ShouldNotEndsWithHyphen: port to Robot Framework.
Addressed to #530 No functional changes.
1 parent 8e83a85 commit 5d91d24

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 categoryNameEnShouldNotEndsWithHyphen() {
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 categoryNameRuShouldNotEndsWithHyphen() {
94-
page.addCategory(TEST_CATEGORY_NAME_EN, "тест-");
95-
96-
assertThat(page).field("nameRu").hasError(tr("value.hyphen"));
97-
}
98-
9985
@Test(groups = "misc", dependsOnGroups = "std")
10086
public void categoryNameEnShouldBeStripedFromLeadingAndTrailingSpaces() {
10187
page.addCategory(" t3st ", 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
@@ -49,6 +49,14 @@ Create category 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 category 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-category-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
Create category with existing name
5361
[Documentation] Verify validation of non-unique name
5462
Input Text id=name Sport

0 commit comments

Comments
 (0)