@@ -39,27 +39,25 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
39
39
expect ( brand ) . toEqual ( 'KitchenAid' ) ;
40
40
} ) ;
41
41
42
- if ( flavor !== 'vue' ) {
43
- it ( 'must have lower price set to $50 and the upper price set to $350 in the price range' , async ( ) => {
44
- const lowerPrice = await browser . getRangeSliderLowerBoundValue ( ) ;
45
- const upperPrice = await browser . getRangeSliderUpperBoundValue ( ) ;
42
+ it ( 'must have lower price set to $50 and the upper price set to $350 in the price range' , async ( ) => {
43
+ const lowerPrice = await browser . getRangeSliderLowerBoundValue ( ) ;
44
+ const upperPrice = await browser . getRangeSliderUpperBoundValue ( ) ;
46
45
47
- expect ( lowerPrice ) . toEqual ( 50 ) ;
48
- expect ( upperPrice ) . toEqual ( 350 ) ;
49
- } ) ;
46
+ expect ( lowerPrice ) . toEqual ( 50 ) ;
47
+ expect ( upperPrice ) . toEqual ( 350 ) ;
48
+ } ) ;
50
49
51
- it ( 'must have free shipping box checked' , async ( ) => {
52
- const freeShipping = await browser . getToggleRefinementStatus ( ) ;
50
+ it ( 'must have free shipping box checked' , async ( ) => {
51
+ const freeShipping = await browser . getToggleRefinementStatus ( ) ;
53
52
54
- expect ( freeShipping ) . toEqual ( true ) ;
55
- } ) ;
53
+ expect ( freeShipping ) . toEqual ( true ) ;
54
+ } ) ;
56
55
57
- it ( 'must have rating "4 & up" selected in the rating menu' , async ( ) => {
58
- const rating = await browser . getSelectedRatingMenuItem ( ) ;
56
+ it ( 'must have rating "4 & up" selected in the rating menu' , async ( ) => {
57
+ const rating = await browser . getSelectedRatingMenuItem ( ) ;
59
58
60
- expect ( rating ) . toEqual ( '4 & up' ) ;
61
- } ) ;
62
- }
59
+ expect ( rating ) . toEqual ( '4 & up' ) ;
60
+ } ) ;
63
61
64
62
it ( 'must have "Price descending" selected in the sort select' , async ( ) => {
65
63
const sortBy = await browser . getSortByValue ( ) ;
@@ -129,15 +127,13 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
129
127
await browser . setSortByValue ( 'Price ascending' ) ;
130
128
} ) ;
131
129
132
- if ( flavor !== 'vue' ) {
133
- it ( 'sets lower price to $250 and the upper price to $1250 in the price range' , async ( ) => {
134
- // Depending of the steps calculation there can be a difference between
135
- // the wanted value and the actual value of the slider, so we store
136
- // the actual value to use it in for subsequent tests
137
- priceBounds . lower = await browser . dragRangeSliderLowerBoundTo ( 250 ) ;
138
- priceBounds . upper = await browser . dragRangeSliderUpperBoundTo ( 1250 ) ;
139
- } ) ;
140
- }
130
+ it ( 'sets lower price to $250 and the upper price to $1250 in the price range' , async ( ) => {
131
+ // Depending of the steps calculation there can be a difference between
132
+ // the wanted value and the actual value of the slider, so we store
133
+ // the actual value to use it in for subsequent tests
134
+ priceBounds . lower = await browser . dragRangeSliderLowerBoundTo ( 250 ) ;
135
+ priceBounds . upper = await browser . dragRangeSliderUpperBoundTo ( 1250 ) ;
136
+ } ) ;
141
137
142
138
it ( 'selects "64 hits per page" in the hits per page select' , async ( ) => {
143
139
await browser . setHitsPerPage ( '64 hits per page' ) ;
@@ -153,19 +149,15 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
153
149
const url = await browser . getUrl ( ) ;
154
150
const { pathname, searchParams } = new URL ( url ) ;
155
151
156
- const range =
157
- flavor === 'vue' ||
158
- searchParams . get ( 'price' ) ===
159
- `${ priceBounds . lower } :${ priceBounds . upper } ` ;
160
-
161
152
return (
162
153
pathname ===
163
154
`/${ root } search/Appliances%2FRanges%2C+Cooktops+%26+Ovens/` &&
164
155
searchParams . get ( 'query' ) === 'cooktop' &&
165
156
searchParams . get ( 'page' ) === '2' &&
166
157
searchParams . get ( 'brands' ) === 'Whirlpool' &&
167
158
searchParams . get ( 'rating' ) === '3' &&
168
- range &&
159
+ searchParams . get ( 'price' ) ===
160
+ `${ priceBounds . lower } :${ priceBounds . upper } ` &&
169
161
searchParams . get ( 'sortBy' ) === 'instant_search_price_asc' &&
170
162
searchParams . get ( 'hitsPerPage' ) === '64'
171
163
) ;
0 commit comments