Skip to content

Commit dbcb25c

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

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
@@ -81,20 +81,6 @@ public void categoryNameRuWithAllowedCharactersShouldBeAccepted() {
8181

8282
assertThat(page).field("nameRu").hasNoError();
8383
}
84-
85-
@Test(groups = "misc", dependsOnGroups = "std")
86-
public void categoryNameEnShouldBeStripedFromLeadingAndTrailingSpaces() {
87-
page.addCategory(" t3st ", TEST_CATEGORY_NAME_RU);
88-
89-
assertThat(page).field("name").hasValue("t3st");
90-
}
91-
92-
@Test(groups = "misc", dependsOnGroups = "std")
93-
public void categoryNameRuShouldBeStripedFromLeadingAndTrailingSpaces() {
94-
page.addCategory(TEST_CATEGORY_NAME_EN, " т3ст ");
95-
96-
assertThat(page).field("nameRu").hasValue("т3ст");
97-
}
9884

9985
@Test(groups = "misc", dependsOnGroups = "std")
10086
public void categoryNameEnShouldReplaceRepeatedSpacesByOne() {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ Create category with existing name
6565
Element Text Should Be id=name.errors Category already exists
6666
Element Text Should Be id=nameRu.errors Category already exists
6767

68+
Category name should be stripped from leading and trailing spaces
69+
[Documentation] Verify removing of leading and trailing spaces from name
70+
Input Text id=name ${SPACE * 2}t3st${SPACE * 2}
71+
Input Text id=nameRu ${SPACE * 2}т3ст${SPACE * 2}
72+
Submit Form id=add-category-form
73+
Textfield Value Should Be id=name t3st
74+
Textfield Value Should Be id=nameRu т3ст
75+
6876
*** Keywords ***
6977
Before Test Suite
7078
[Documentation] Open browsers, register fail hook and login as admin

0 commit comments

Comments
 (0)