@@ -39,27 +39,25 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
3939 expect ( brand ) . toEqual ( 'KitchenAid' ) ;
4040 } ) ;
4141
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 ( ) ;
4645
47- expect ( lowerPrice ) . toEqual ( 50 ) ;
48- expect ( upperPrice ) . toEqual ( 350 ) ;
49- } ) ;
46+ expect ( lowerPrice ) . toEqual ( 50 ) ;
47+ expect ( upperPrice ) . toEqual ( 350 ) ;
48+ } ) ;
5049
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 ( ) ;
5352
54- expect ( freeShipping ) . toEqual ( true ) ;
55- } ) ;
53+ expect ( freeShipping ) . toEqual ( true ) ;
54+ } ) ;
5655
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 ( ) ;
5958
60- expect ( rating ) . toEqual ( '4 & up' ) ;
61- } ) ;
62- }
59+ expect ( rating ) . toEqual ( '4 & up' ) ;
60+ } ) ;
6361
6462 it ( 'must have "Price descending" selected in the sort select' , async ( ) => {
6563 const sortBy = await browser . getSortByValue ( ) ;
@@ -129,15 +127,13 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
129127 await browser . setSortByValue ( 'Price ascending' ) ;
130128 } ) ;
131129
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+ } ) ;
141137
142138 it ( 'selects "64 hits per page" in the hits per page select' , async ( ) => {
143139 await browser . setHitsPerPage ( '64 hits per page' ) ;
@@ -153,19 +149,15 @@ export function createInitialStateFromRouteTestSuite(flavor: string) {
153149 const url = await browser . getUrl ( ) ;
154150 const { pathname, searchParams } = new URL ( url ) ;
155151
156- const range =
157- flavor === 'vue' ||
158- searchParams . get ( 'price' ) ===
159- `${ priceBounds . lower } :${ priceBounds . upper } ` ;
160-
161152 return (
162153 pathname ===
163154 `/${ root } search/Appliances%2FRanges%2C+Cooktops+%26+Ovens/` &&
164155 searchParams . get ( 'query' ) === 'cooktop' &&
165156 searchParams . get ( 'page' ) === '2' &&
166157 searchParams . get ( 'brands' ) === 'Whirlpool' &&
167158 searchParams . get ( 'rating' ) === '3' &&
168- range &&
159+ searchParams . get ( 'price' ) ===
160+ `${ priceBounds . lower } :${ priceBounds . upper } ` &&
169161 searchParams . get ( 'sortBy' ) === 'instant_search_price_asc' &&
170162 searchParams . get ( 'hitsPerPage' ) === '64'
171163 ) ;
0 commit comments