Skip to content

Commit 29c8230

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

File tree

2 files changed

+44
-14
lines changed

2 files changed

+44
-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() {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
*** Settings ***
2+
Documentation Verify miscellaneous aspects of category creation
3+
Library Selenium2Library
4+
Suite Setup Before Test Suite
5+
Suite Teardown After Test Suite
6+
Test Setup Before Test
7+
Force Tags Category Misc
8+
9+
*** Test Cases ***
10+
Category name should be stripped from leading and trailing spaces
11+
[Documentation] Verify removing of leading and trailing spaces from name
12+
Input Text id=name ${SPACE * 2}t3st${SPACE * 2}
13+
Input Text id=nameRu ${SPACE * 2}т3ст${SPACE * 2}
14+
Submit Form id=add-category-form
15+
Textfield Value Should Be id=name t3st
16+
Textfield Value Should Be id=nameRu т3ст
17+
18+
*** Keywords ***
19+
Before Test Suite
20+
[Documentation] Open browsers, register fail hook and login as admin
21+
Open Browser ${SITE_URL} ${BROWSER}
22+
Register Keyword To Run On Failure Log Source
23+
Log In As login=admin password=test
24+
25+
Before Test
26+
[Documentation] Open create category page
27+
Go To ${SITE_URL}/category/add
28+
29+
After Test Suite
30+
[Documentation] Log out and close browser
31+
Log Out
32+
Close Browser
33+
34+
Log In As
35+
[Documentation] Log in as a user
36+
[Arguments] ${login} ${password}
37+
Go To ${SITE_URL}/account/auth
38+
Input Text id=login ${login}
39+
Input Password id=password ${password}
40+
Submit Form id=auth-account-form
41+
42+
Log Out
43+
[Documentation] Log out current user
44+
Submit Form id=logout-form

0 commit comments

Comments
 (0)