diff --git a/packages/drop-in/src/index.e2e.ts b/packages/drop-in/src/index.e2e.ts index f0f5aa56..0ac11d89 100644 --- a/packages/drop-in/src/index.e2e.ts +++ b/packages/drop-in/src/index.e2e.ts @@ -16,7 +16,10 @@ const codes = { noOverselling: 'GMUG11OZFFFFFF000000XXXX', noDiscount: 'BACKPACKFFFFFF000000XXXX', outOfStock: '5PANECAP9D9CA1FFFFFFXXXX', - doNotTrack: 'BOTT17OZFFFFFF000000XXXX' + doNotTrack: 'BOTT17OZFFFFFF000000XXXX', + subscription: 'POLOMXXX000000FFFFFFMXXX', + bundleAvailable: 'CLGETTINGSTARTED', + bundleOutOfStock: 'CLOUTOFSTOCK' } // eslint-disable-next-line @typescript-eslint/explicit-function-return-type @@ -73,6 +76,9 @@ const availableElements = getCodeElements(codes.available) const noDiscountElements = getCodeElements(codes.noDiscount) const outOfStockElements = getCodeElements(codes.outOfStock) const doNotTrackElements = getCodeElements(codes.doNotTrack) +const subscriptionElements = getCodeElements(codes.subscription) +const bundleAvailableElements = getCodeElements(codes.bundleAvailable) +const bundleOutOfStockElements = getCodeElements(codes.bundleOutOfStock) // eslint-disable-next-line prettier/prettier const getCartLink = async (page: E2EPage): Promise => await page.find('cl-cart-link') @@ -192,6 +198,81 @@ describe('index.e2e', () => { Out Of Stock + +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
+ +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
+ +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
` }) @@ -300,6 +381,69 @@ describe('index.e2e', () => { Out Of Stock + +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
+ +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
+ +
+ Add to cart + + + + + + + Available + ready to be shipped in + + - + + days with + + () + + Out Of Stock + +
`) @@ -526,6 +670,171 @@ describe('index.e2e', () => { `) + /** + * EXPECTATIONS FOR "SUBSCRIPTION" PRODUCT + */ + + expect(await subscriptionElements.getPriceAmount(page)).toEqualHtml(` + + + $107.00 + + + `) + + expect(await subscriptionElements.getPriceCompareAtAmount(page)) + .toEqualHtml(` + + + + $119.90 + + + + `) + + expect(await subscriptionElements.getAvailabilityInfoMinDays(page)) + .toEqualHtml(` + + + 4 + + + `) + + expect(await subscriptionElements.getAvailabilityInfoMaxDays(page)) + .toEqualHtml(` + + + 6 + + + `) + + expect( + await subscriptionElements.getAvailabilityInfoShippingMethodName(page) + ).toEqualHtml(` + + + Standard Shipping + + + `) + + expect( + await subscriptionElements.getAvailabilityInfoShippingMethodPrice(page) + ).toEqualHtml(` + + + $7.00 + + + `) + + /** + * EXPECTATIONS FOR "AVAILABLE BUNDLE" PRODUCT + */ + + expect(await bundleAvailableElements.getPriceAmount(page)).toEqualHtml(` + + + $100.00 + + + `) + + expect(await bundleAvailableElements.getPriceCompareAtAmount(page)) + .toEqualHtml(` + + + + $405.00 + + + + `) + + expect(await bundleAvailableElements.getAvailabilityInfoMinDays(page)) + .toEqualHtml(` + + + + `) + + expect(await bundleAvailableElements.getAvailabilityInfoMaxDays(page)) + .toEqualHtml(` + + + + `) + + expect( + await bundleAvailableElements.getAvailabilityInfoShippingMethodName(page) + ).toEqualHtml(` + + + + `) + + expect( + await bundleAvailableElements.getAvailabilityInfoShippingMethodPrice(page) + ).toEqualHtml(` + + + + `) + + /** + * EXPECTATIONS FOR "AVAILABLE OUT-OF-STOCK" PRODUCT + */ + + expect(await bundleOutOfStockElements.getPriceAmount(page)).toEqualHtml(` + + + $85.30 + + + `) + + expect(await bundleOutOfStockElements.getPriceCompareAtAmount(page)) + .toEqualHtml(` + + + + `) + + expect(await bundleOutOfStockElements.getAvailabilityInfoMinDays(page)) + .toEqualHtml(` + + + + `) + + expect(await bundleOutOfStockElements.getAvailabilityInfoMaxDays(page)) + .toEqualHtml(` + + + + `) + + expect( + await bundleOutOfStockElements.getAvailabilityInfoShippingMethodName(page) + ).toEqualHtml(` + + + + `) + + expect( + await bundleOutOfStockElements.getAvailabilityInfoShippingMethodPrice( + page + ) + ).toEqualHtml(` + + + + `) + /** * ADD TO CART */