29
29
import org .testng .annotations .AfterClass ;
30
30
import org .testng .annotations .BeforeClass ;
31
31
import org .testng .annotations .BeforeMethod ;
32
- import org .testng .annotations .DataProvider ;
33
32
import org .testng .annotations .Test ;
34
33
35
34
import ru .mystamps .web .tests .page .AbstractPage ;
36
35
import ru .mystamps .web .tests .page .AddSeriesPage ;
37
36
import ru .mystamps .web .tests .page .InfoSeriesPage ;
38
37
39
- import static ru .mystamps .web .tests .TranslationUtils .tr ;
40
38
import static ru .mystamps .web .tests .fest .PageWithFormAssert .assertThat ;
41
39
42
40
import static org .fest .assertions .api .Assertions .assertThat ;
@@ -118,23 +116,6 @@ public void shouldHaveStandardStructure() {
118
116
checkStandardStructure ();
119
117
}
120
118
121
- @ Test (groups = "invalid" , dependsOnGroups = "std" , dataProvider = "invalidCatalogPrices" )
122
- public void catalogPricesShouldRejectInvalidValues (String price , String msg ) {
123
- page .showCatalogNumbers ();
124
-
125
- page .fillMichelPrice (price );
126
- page .fillScottPrice (price );
127
- page .fillYvertPrice (price );
128
- page .fillGibbonsPrice (price );
129
-
130
- page .submit ();
131
-
132
- assertThat (page ).field ("michelPrice" ).hasError (msg );
133
- assertThat (page ).field ("scottPrice" ).hasError (msg );
134
- assertThat (page ).field ("yvertPrice" ).hasError (msg );
135
- assertThat (page ).field ("gibbonsPrice" ).hasError (msg );
136
- }
137
-
138
119
@ Test (groups = "misc" , dependsOnGroups = "std" )
139
120
public void issueYearFieldShouldHaveOptionsForRangeFrom1840ToCurrentYear () {
140
121
page .showDateOfRelease ();
@@ -169,7 +150,7 @@ public void commentShouldBeStripedFromLeadingAndTrailingSpaces() {
169
150
assertThat (page ).field ("comment" ).hasValue ("example comment" );
170
151
}
171
152
172
- @ Test (groups = "logic" , dependsOnGroups = { "std" , "invalid" , " misc" })
153
+ @ Test (groups = "logic" , dependsOnGroups = { "std" , "misc" })
173
154
public void shouldIgnoreDuplicatedCatalogNumbers () {
174
155
page .fillCategory (validCategoryName );
175
156
page .fillQuantity ("2" );
@@ -191,7 +172,7 @@ public void shouldIgnoreDuplicatedCatalogNumbers() {
191
172
assertThat (nextPage .getGibbonsCatalogInfo ()).isEqualTo ("#134, 135" );
192
173
}
193
174
194
- @ Test (groups = "logic" , dependsOnGroups = { "std" , "invalid" , " misc" })
175
+ @ Test (groups = "logic" , dependsOnGroups = { "std" , "misc" })
195
176
public void shouldAllowExistingCatalogNumbers () {
196
177
page .fillCategory (validCategoryName );
197
178
page .fillQuantity ("2" );
@@ -212,15 +193,4 @@ public void shouldAllowExistingCatalogNumbers() {
212
193
assertThat (nextPage .getGibbonsCatalogInfo ()).isEqualTo ("#" + existingGibbonsNumber );
213
194
}
214
195
215
- @ DataProvider (name = "invalidCatalogPrices" )
216
- public Object [][] getInvalidCatalogPrices () {
217
- String expectedErrorMessage = tr ("ru.mystamps.web.validation.jsr303.Price.message" );
218
-
219
- return new Object [][] {
220
- {"0" , expectedErrorMessage },
221
- {"-1" , expectedErrorMessage },
222
- {"NaN" , expectedErrorMessage }
223
- };
224
- }
225
-
226
196
}
0 commit comments