Skip to content

Commit

Permalink
update after including merch high position changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 committed Jan 16, 2025
1 parent 0734082 commit 8496f75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dotcom-rendering/src/lib/getFrontsAdPositions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ describe('Mobile Ads', () => {
{
collectionType: 'scrollable/feature',
containerLevel: 'Secondary',
}, // Ad position (21)
}, // Ignored - is merch high position
{ collectionType: 'news/most-popular' }, // Ignored - is most viewed container
];

const mobileAdPositions = getMobileAdPositions(testCollections);

expect(mobileAdPositions).toEqual([0, 4, 6, 8, 10, 14, 19, 21]);
expect(mobileAdPositions).toEqual([0, 4, 6, 8, 10, 14, 19]);
});
});

Expand Down
2 changes: 1 addition & 1 deletion dotcom-rendering/src/lib/getFrontsAdPositions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const isEvenIndex = (_collection: unknown, index: number): boolean =>
* up to a maximum of `MAX_FRONTS_MOBILE_ADS`
*/
const getMobileAdPositions = (collections: AdCandidate[]): number[] => {
const merchHighPosition = getMerchHighPosition(collections.length);
const merchHighPosition = getMerchHighPosition(collections);
const hasSecondaryContainers = hasSecondaryLevelContainers(collections);

return (
Expand Down

0 comments on commit 8496f75

Please sign in to comment.