Skip to content

Commit e906461

Browse files
committed
refactor(WhenUserAddSeries): port catalogNumbersShouldBeStripedFromSpaces() to Robot Framework.
Also remove a similar test from misc-admin.robot: one test for that case is enough. If this will be broken only for admin it won't be so critical as when it's broken for users. Addressed to #530 No functional changes.
1 parent f8178d3 commit e906461

File tree

3 files changed

+21
-42
lines changed

3 files changed

+21
-42
lines changed

src/test/java/ru/mystamps/web/tests/cases/WhenUserAddSeries.java

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -97,28 +97,7 @@ public void tearDown() {
9797
page.logout();
9898
}
9999

100-
@Test(groups = "misc")
101-
public void catalogNumbersShouldBeStripedFromSpaces() {
102-
page.showCatalogNumbers();
103-
104-
page.fillMichelNumbers(" 1 , 2 ");
105-
page.fillScottNumbers(" 3 , 4 ");
106-
page.fillYvertNumbers(" 5 , 6 ");
107-
page.fillGibbonsNumbers(" 7 , 8 ");
108-
page.fillSolovyovNumbers(" 9 , 10 ");
109-
page.fillZagorskiNumbers(" 11 , 12 ");
110-
111-
page.submit();
112-
113-
assertThat(page).field("michelNumbers").hasValue("1,2");
114-
assertThat(page).field("scottNumbers").hasValue("3,4");
115-
assertThat(page).field("yvertNumbers").hasValue("5,6");
116-
assertThat(page).field("gibbonsNumbers").hasValue("7,8");
117-
assertThat(page).field("solovyovNumbers").hasValue("9,10");
118-
assertThat(page).field("zagorskiNumbers").hasValue("11,12");
119-
}
120-
121-
@Test(groups = "logic", dependsOnGroups = { "misc" })
100+
@Test(groups = "logic")
122101
public void shouldCreateSeriesWithOnlyRequiredFieldsFilled() {
123102
String expectedCategoryName = validCategoryName;
124103
String expectedQuantity = "2";
@@ -145,7 +124,7 @@ public void shouldCreateSeriesWithOnlyRequiredFieldsFilled() {
145124
assertThat(nextPage.getPerforated()).isEqualTo(tr("t_yes"));
146125
}
147126

148-
@Test(groups = "logic", dependsOnGroups = { "misc" })
127+
@Test(groups = "logic")
149128
public void shouldCreateSeriesWithAllFieldsFilled() {
150129
String expectedPageUrl = Url.INFO_SERIES_PAGE.replace("{id}", "\\d+");
151130
String expectedImageUrl = Url.SITE + Url.GET_IMAGE_PREVIEW_PAGE.replace("{id}", "\\d+");
@@ -215,7 +194,7 @@ public void shouldCreateSeriesWithAllFieldsFilled() {
215194
assertThat(nextPage.getZagorskiCatalogInfo()).isEqualTo("#50-52 (150.2 RUB)");
216195
}
217196

218-
@Test(groups = "logic", dependsOnGroups = { "misc" })
197+
@Test(groups = "logic")
219198
public void shouldIgnoreDuplicatedCatalogNumbers() {
220199
page.fillCategory(validCategoryName);
221200
page.fillQuantity("2");
@@ -241,7 +220,7 @@ public void shouldIgnoreDuplicatedCatalogNumbers() {
241220
assertThat(nextPage.getZagorskiCatalogInfo()).isEqualTo("#54, 55");
242221
}
243222

244-
@Test(groups = "logic", dependsOnGroups = { "misc" })
223+
@Test(groups = "logic")
245224
public void shouldAllowExistingCatalogNumbers() {
246225
page.fillCategory(validCategoryName);
247226
page.fillQuantity("2");

src/test/robotframework/series/creation/misc-admin.robot

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ Suite Teardown After Test Suite
77
Force Tags series misc
88

99
*** Test Cases ***
10-
Catalog numbers should be stripped from leading and trailing spaces
11-
[Tags] unstable
12-
Click Element id=add-catalog-numbers-link
13-
Input Text id=michelNumbers ${SPACE * 2}1 , 2${SPACE * 2}
14-
Input Text id=scottNumbers ${SPACE * 2}3 , 4${SPACE * 2}
15-
Input Text id=yvertNumbers ${SPACE * 2}5 , 6${SPACE * 2}
16-
Input Text id=gibbonsNumbers ${SPACE * 2}7 , 8${SPACE * 2}
17-
Input Text id=solovyovNumbers ${SPACE * 2}9 , 10${SPACE * 2}
18-
Input Text id=zagorskiNumbers ${SPACE * 2}11 , 12${SPACE * 2}
19-
Submit Form id=add-series-form
20-
Textfield Value Should Be id=michelNumbers 1,2
21-
Textfield Value Should Be id=scottNumbers 3,4
22-
Textfield Value Should Be id=yvertNumbers 5,6
23-
Textfield Value Should Be id=gibbonsNumbers 7,8
24-
Textfield Value Should Be id=solovyovNumbers 9,10
25-
Textfield Value Should Be id=zagorskiNumbers 11,12
26-
2710
Catalog numbers should ignore duplicate values
2811
[Tags] unstable
2912
Select From List By Label id=category Sport

src/test/robotframework/series/creation/misc-user.robot

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ Catalog numbers should accept valid values
2727
71, 81, 91
2828
1000
2929

30+
Catalog numbers should be stripped from any spaces
31+
[Tags] unstable
32+
Click Element id=add-catalog-numbers-link
33+
Input Text id=michelNumbers ${SPACE * 2}1 , 2${SPACE * 2}
34+
Input Text id=scottNumbers ${SPACE * 2}3 , 4${SPACE * 2}
35+
Input Text id=yvertNumbers ${SPACE * 2}5 , 6${SPACE * 2}
36+
Input Text id=gibbonsNumbers ${SPACE * 2}7 , 8${SPACE * 2}
37+
Input Text id=solovyovNumbers ${SPACE * 2}9 , 10${SPACE * 2}
38+
Input Text id=zagorskiNumbers ${SPACE * 2}11 , 12${SPACE * 2}
39+
Submit Form id=add-series-form
40+
Textfield Value Should Be id=michelNumbers 1,2
41+
Textfield Value Should Be id=scottNumbers 3,4
42+
Textfield Value Should Be id=yvertNumbers 5,6
43+
Textfield Value Should Be id=gibbonsNumbers 7,8
44+
Textfield Value Should Be id=solovyovNumbers 9,10
45+
Textfield Value Should Be id=zagorskiNumbers 11,12
46+
3047
*** Keywords ***
3148
Before Test Suite
3249
Open Browser ${SITE_URL}/account/auth ${BROWSER}

0 commit comments

Comments
 (0)