Adds SFRA 6.0

This commit is contained in:
Isaac Vallee
2021-12-21 10:57:31 -08:00
parent d04eb5dd16
commit 823c7608c3
1257 changed files with 137087 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
const { data, pageDesigner } = inject();
When('Shopper sees the carousel {string}', (position) => {
var carouselPosition = position;
pageDesigner.seeCarousel(carouselPosition);
});
Given('Shopper sees carousel controls in carousel {string}', (position) => {
var carouselPosition = position;
pageDesigner.controlsVisible(carouselPosition);
});
Then('Shopper should see the next slide in the first carousel', () => {
pageDesigner.verifySlide(1, data.pageDesigner.mainBannerHeading2, pageDesigner.locators.mainBannerHeading);
});
When('Shopper clicks previous in carousel {string}', (position) => {
var carouselPosition = position;
pageDesigner.carouselControlClick(carouselPosition, pageDesigner.locators.carouselPrevious);
});
Then('Shopper should see the previous slide in the first carousel', () => {
pageDesigner.verifySlide(1, data.pageDesigner.mainBannerHeading, pageDesigner.locators.mainBannerHeading);
});
When('Shopper clicks next in carousel {string} {int} time(s)', (position, clicks) => {
var carouselPosition = position;
var carouselClicks = clicks;
for (var i = 0; i < carouselClicks; i++) {
pageDesigner.carouselControlClick(carouselPosition, pageDesigner.locators.carouselNext);
}
});
Then('Shopper should see next product in the second carousel', () => {
pageDesigner.verifySlide(2, data.pageDesigner.productTileProductName, '.product-name-link');
});
Then('Shopper should see previous slide in the second carousel', () => {
pageDesigner.verifySlide(2, data.pageDesigner.productTileProductName5, '.product-name-link');
});