@@ -223,6 +223,7 @@ describe('enhanceProductSummary', () => {
223223 const output = enhanceProductSummary ( {
224224 pageId : allowedPageId ,
225225 serverSideABTests : { 'thefilter-at-a-glance-redesign' : 'carousel' } ,
226+ renderingTarget : 'Web' ,
226227 } ) ( input ) ;
227228
228229 const carousel = findCarousel ( output ) ;
@@ -263,10 +264,52 @@ describe('enhanceProductSummary', () => {
263264 const output = enhanceProductSummary ( {
264265 pageId : allowedPageId ,
265266 serverSideABTests : { 'thefilter-at-a-glance-redesign' : 'stacked' } ,
267+ renderingTarget : 'Web' ,
266268 } ) ( input ) ;
267269
268270 const stacked = findStacked ( output ) ;
269271
270272 expect ( stacked ) . toBeDefined ( ) ;
271273 } ) ;
274+
275+ it ( 'does not return stacked cards when the rendering target is apps' , ( ) => {
276+ const allowedPageId =
277+ 'thefilter/test-article-example-for-product-summary' ;
278+
279+ const input = [
280+ atAGlanceHeading ( ) ,
281+ linkElement (
282+ 'https://www.homebase.co.uk/en-uk/tower-airx-t17166-5l-grey-single-basket-air-fryer-digital-air-fryer/p/0757395' ,
283+ 'Buy now' ,
284+ ) ,
285+ linkElement (
286+ 'https://www.lakeland.co.uk/27537/lakeland-slimline-air-fryer-black-8l' ,
287+ 'Buy now' ,
288+ ) ,
289+ linkElement (
290+ 'https://ninjakitchen.co.uk/product/ninja-double-stack-xl-9-5l-air-fryer-sl400uk-zidSL400UK' ,
291+ 'Buy now' ,
292+ ) ,
293+ dividerElement ( ) ,
294+ productElement ( [
295+ 'https://www.homebase.co.uk/en-uk/tower-airx-t17166-5l-grey-single-basket-air-fryer-digital-air-fryer/p/0757395' ,
296+ ] ) ,
297+ productElement ( [
298+ 'https://www.lakeland.co.uk/27537/lakeland-slimline-air-fryer-black-8l' ,
299+ ] ) ,
300+ productElement ( [
301+ 'https://ninjakitchen.co.uk/product/ninja-double-stack-xl-9-5l-air-fryer-sl400uk-zidSL400UK' ,
302+ ] ) ,
303+ ] ;
304+
305+ const output = enhanceProductSummary ( {
306+ pageId : allowedPageId ,
307+ serverSideABTests : { 'thefilter-at-a-glance-redesign' : 'stacked' } ,
308+ renderingTarget : 'Apps' ,
309+ } ) ( input ) ;
310+
311+ const stacked = findStacked ( output ) ;
312+
313+ expect ( stacked ) . toBeUndefined ( ) ;
314+ } ) ;
272315} ) ;
0 commit comments