Skip to content

Commit

Permalink
Add product snapshots (#812)
Browse files Browse the repository at this point in the history
Snapshot the the product video and image cards

J=SLAP-1361
TEST=visual

Check updated percy snapshots
  • Loading branch information
cea2aj committed Jun 4, 2021
1 parent 7a90b17 commit c964561
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test-site/config/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"mapConfig": {
"mapProvider": "Google"
}
},
"products": {
"universalSectionTemplate": "grid-three-columns",
"cardType": "product-prominentimage"
}
}
}
10 changes: 10 additions & 0 deletions test-site/scripts/create-verticals.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ const verticalConfiguration = {
verticalKey: 'people',
template: 'vertical-grid',
cardName: 'standard'
},
products: {
verticalKey: 'products',
template: 'vertical-grid',
cardName: 'multilang-product-prominentvideo'
},
products_clickable_image: {
verticalKey: 'products',
template: 'vertical-grid',
cardName: 'product-prominentimage-clickable'
}
};

Expand Down
9 changes: 9 additions & 0 deletions tests/percy/photographer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class Photographer {
await this._pageNavigator.gotoUniversalPage({ query: 'what if i forget my password?'});
await this._pageNavigator.click('.HitchhikerFaqAccordion-toggle')
await this._camera.snapshot('universal-search--faq-accordion');

await this._pageNavigator.gotoUniversalPage({ query: 'yext answers'});
await this._camera.snapshot('universal-search--product-prominentimage');
}

async _captureVerticalSearch () {
Expand All @@ -57,6 +60,12 @@ class Photographer {

await this._pageNavigator.gotoVerticalPage('people', { query: 'vrginia' });
await this._camera.snapshot('vertical-grid-search--spellcheck');

await this._pageNavigator.gotoVerticalPage('products', { query: 'yext answers' });
await this._camera.snapshot('vertical-grid-search--product-prominentvideo');

await this._pageNavigator.gotoVerticalPage('products_clickable_image', { query: 'yext answers' });
await this._camera.snapshot('vertical-grid-search--product-prominentimage-clickable');
}

async _captureVerticalMapSearch () {
Expand Down

0 comments on commit c964561

Please sign in to comment.