From 1cb1fb5a235e6c46a62c2ca25aa112b998c25693 Mon Sep 17 00:00:00 2001
From: kpawelczak <42094017+kpawelczak@users.noreply.github.com>
Date: Tue, 11 Jul 2023 16:46:19 +0200
Subject: [PATCH 1/3] feat: pre-fill delivery address for guest users (#17607)
---
.../checkout-delivery-address.component.html | 1 +
.../checkout-delivery-address.component.ts | 53 ++++++++++++++++++-
.../services/checkout-config.service.ts | 4 ++
.../base/root/config/checkout-config.ts | 4 ++
4 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html b/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html
index 3f18a8cd4f1..3a073673822 100644
--- a/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html
+++ b/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html
@@ -102,6 +102,7 @@
Date: Wed, 12 Jul 2023 16:59:07 +0530
Subject: [PATCH 2/3] CDC-B2B- Change Password pop-up does not appear during
1st time user login (#17623)
---
.../cdc/root/service/cdc-js.service.spec.ts | 21 +++++++++++++++++++
.../cdc/root/service/cdc-js.service.ts | 17 ++++++++++++++-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/integration-libs/cdc/root/service/cdc-js.service.spec.ts b/integration-libs/cdc/root/service/cdc-js.service.spec.ts
index 2e79b9c300f..c5744f4d8a4 100644
--- a/integration-libs/cdc/root/service/cdc-js.service.spec.ts
+++ b/integration-libs/cdc/root/service/cdc-js.service.spec.ts
@@ -1,6 +1,7 @@
import { TestBed } from '@angular/core/testing';
import {
AuthService,
+ BaseSite,
BaseSiteService,
GlobalMessageService,
GlobalMessageType,
@@ -37,6 +38,9 @@ class BaseSiteServiceStub implements Partial {
getActive(): Observable {
return of('electronics-spa');
}
+ get(_siteUid?: string): Observable {
+ return of({ uid: 'electronics-spa', channel: 'B2C' });
+ }
}
class LanguageServiceStub implements Partial {
getActive(): Observable {
@@ -441,6 +445,7 @@ describe('CdcJsService', () => {
describe('loginUserWithoutScreenSet', () => {
it('should login user without screenset', (done) => {
+ expect(service['getCurrentBaseSite']()).toBe('electronics-spa');
spyOn(service['gigyaSDK'].accounts, 'login').and.callFake(
(options: { callback: Function }) => {
options.callback({ status: 'OK' });
@@ -696,6 +701,22 @@ describe('CdcJsService', () => {
});
});
+ describe('getCurrentBaseSiteChannel', () => {
+ it('should return the channel value of the base site - B2C', () => {
+ spyOn(baseSiteService, 'get').and.returnValue(
+ of({ uid: 'electronics-spa', channel: 'B2C' })
+ );
+ expect(service['getCurrentBaseSiteChannel']()).toBe('B2C');
+ });
+
+ it('should return the channel of the base site - B2B', () => {
+ spyOn(baseSiteService, 'get').and.returnValue(
+ of({ uid: 'powertools-spa', channel: 'B2B' })
+ );
+ expect(service['getCurrentBaseSiteChannel']()).toBe('B2B');
+ });
+ });
+
describe('updateProfileWithoutScreenSet', () => {
it('should not call accounts.setAccountInfo', (done) => {
spyOn(service['gigyaSDK'].accounts, 'setAccountInfo').and.callFake(
diff --git a/integration-libs/cdc/root/service/cdc-js.service.ts b/integration-libs/cdc/root/service/cdc-js.service.ts
index 26aee76e4d1..ae41fde89df 100644
--- a/integration-libs/cdc/root/service/cdc-js.service.ts
+++ b/integration-libs/cdc/root/service/cdc-js.service.ts
@@ -255,13 +255,18 @@ export class CdcJsService implements OnDestroy {
context?: any
): Observable<{ status: string }> {
const missingConsentErrorCode = 206001;
+ let ignoreInterruptions = false;
+ const channel = this.getCurrentBaseSiteChannel();
+ if (channel && channel === 'B2C') {
+ ignoreInterruptions = true;
+ }
return this.getSessionExpirationValue().pipe(
switchMap((sessionExpiration) => {
return this.invokeAPI('accounts.login', {
loginID: email,
password: password,
include: 'missing-required-fields',
- ignoreInterruptions: true,
+ ignoreInterruptions: ignoreInterruptions,
...(context && { context: context }),
sessionExpiry: sessionExpiration,
}).pipe(
@@ -367,6 +372,16 @@ export class CdcJsService implements OnDestroy {
return baseSite;
}
+ private getCurrentBaseSiteChannel(): string {
+ let channel: string = '';
+ const baseSiteUid: string = this.getCurrentBaseSite();
+ this.baseSiteService
+ .get(baseSiteUid)
+ .pipe(take(1))
+ .subscribe((data) => (channel = data?.channel ?? ''));
+ return channel;
+ }
+
/**
* Trigger CDC forgot password using CDC APIs.
*
From a2c37155ae56142ef847cd7a37810d643d858375 Mon Sep 17 00:00:00 2001
From: Christoph Hinssen <33626130+ChristophHi@users.noreply.github.com>
Date: Wed, 12 Jul 2023 15:40:26 +0200
Subject: [PATCH 3/3] test: refactor e2e tools to reduce duplication (#17630)
---
.../product-configurator-textfield.e2e.cy.ts | 5 +-
...oduct-configurator-vc-cart.e2e-flaky.cy.ts | 5 +-
...duct-configurator-vc-interactive.e2e.cy.ts | 3 +-
.../cpq/cpq-configuration.ccv2-e2e.cy.ts | 9 ++-
.../cpq/cpq-configuration.core-e2e.cy.ts | 13 ++--
.../cypress/helpers/common.ts | 60 +++++++++++++++++++
.../helpers/product-configurator-cpq.ts | 14 -----
.../helpers/product-configurator-vc.ts | 26 +-------
.../cypress/helpers/product-configurator.ts | 36 +----------
.../helpers/textfield-configuration.ts | 36 -----------
10 files changed, 83 insertions(+), 124 deletions(-)
create mode 100644 projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
index 0ed2ba23464..4283eaf496b 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
@@ -7,6 +7,7 @@
import * as cart from '../../../helpers/cart';
import * as configuration from '../../../helpers/product-configurator';
import * as textfieldConfiguration from '../../../helpers/textfield-configuration';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProduct = '1934793';
@@ -46,8 +47,8 @@ context('Textfield Configuration', () => {
electronicsShop,
testProduct
);
- textfieldConfiguration.clickOnAddToCartBtnOnPD();
- textfieldConfiguration.clickOnViewCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cart.verifyCartNotEmpty();
textfieldConfiguration.clickOnEditConfigurationLink(0);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
index 5361db0d602..3ae7b31c767 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
@@ -12,6 +12,7 @@ import * as configurationCartVc from '../../../helpers/product-configurator-cart
import * as configurationOverview from '../../../helpers/product-configurator-overview';
import * as configurationOverviewVc from '../../../helpers/product-configurator-overview-vc';
import * as configurationVc from '../../../helpers/product-configurator-vc';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProductMultiLevel = 'CONF_HOME_THEATER_ML';
@@ -98,8 +99,8 @@ context('Product Configuration', () => {
it('should be able to navigate from the cart after adding product directly to the cart', () => {
clickAllowAllFromBanner();
configuration.searchForProduct(testProductMultiLevel);
- configuration.clickOnAddToCartBtnOnPD();
- configuration.clickOnViewCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cart.verifyCartNotEmpty();
configurationCart.clickOnEditConfigurationLink(0);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
index ae4e2e9618f..825e716f8ca 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
@@ -8,6 +8,7 @@ import * as configuration from '../../../helpers/product-configurator';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
import * as configurationOverviewVc from '../../../helpers/product-configurator-overview-vc';
import * as configurationVc from '../../../helpers/product-configurator-vc';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProduct = 'CONF_CAMERA_SL';
@@ -96,7 +97,7 @@ context('Product Configuration', () => {
it('should be able to navigate from the product details page', () => {
clickAllowAllFromBanner();
- configurationVc.goToPDPage(electronicsShop, testProduct);
+ common.goToPDPage(electronicsShop, testProduct);
configurationVc.clickOnConfigureBtnInCatalog(testProduct);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
index 73072a13ccd..eaaa97ae98d 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
@@ -8,8 +8,7 @@ import * as configuration from '../../../helpers/product-configurator';
import * as configurationCpq from '../../../helpers/product-configurator-cpq';
import * as configurationOverview from '../../../helpers/product-configurator-overview';
import * as configurationOverviewCpq from '../../../helpers/product-configurator-overview-cpq';
-import * as configurationCart from '../../../helpers/product-configurator-cart';
-import * as configurationCartCpq from '../../../helpers/product-configurator-cart-cpq';
+import * as common from '../../../helpers/common';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
const POWERTOOLS = 'powertools-spa';
@@ -109,14 +108,14 @@ context('CPQ Configuration', () => {
});
it('should be able to navigate from the product details page', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
configurationCpq.clickOnConfigureBtnInCatalog();
});
});
describe('Handling different UI type', () => {
it('should support radio button attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_CUPS, RADGRP);
@@ -137,7 +136,7 @@ context('CPQ Configuration', () => {
});
it('should support checkbox list attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_MODE, CHKBOX);
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
index 6c7348d5060..404da626436 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
@@ -10,6 +10,7 @@ import * as configurationOverview from '../../../helpers/product-configurator-ov
import * as configurationOverviewCpq from '../../../helpers/product-configurator-overview-cpq';
import * as configurationCart from '../../../helpers/product-configurator-cart';
import * as configurationCartCpq from '../../../helpers/product-configurator-cart-cpq';
+import * as common from '../../../helpers/common';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
const POWERTOOLS = 'powertools-spa';
@@ -127,14 +128,14 @@ testConfig.forEach((config) => {
});
it('should be able to navigate from the product details page', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
configurationCpq.clickOnConfigureBtnInCatalog();
});
});
describe('Handling different UI type', () => {
it('should support radio button attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_CUPS, RADGRP);
@@ -165,7 +166,7 @@ testConfig.forEach((config) => {
});
it('should support checkbox list attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_MODE, CHKBOX);
@@ -555,9 +556,9 @@ testConfig.forEach((config) => {
describe('Configuration Process', () => {
it('should support configuration aspect in product search, cart, checkout and order history', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
- configuration.clickOnAddToCartBtnOnPD();
- configuration.clickOnViewCartBtnOnPD();
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cy.get('cx-mini-cart .count').then((elem) => {
const numberOfCartItems = Number(elem.text());
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts
new file mode 100644
index 00000000000..3b8b9edeeb5
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts
@@ -0,0 +1,60 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/**
+ * Clicks on 'Add to cart' on the product details page.
+ */
+export function clickOnAddToCartBtnOnPD(): void {
+ cy.get('cx-add-to-cart button.btn-primary')
+ .contains('Add to cart')
+ .click()
+ .then(() => {
+ cy.get('cx-added-to-cart-dialog').should('be.visible');
+ cy.get('div.cx-dialog-body').should('be.visible');
+ cy.get('div.cx-dialog-buttons a.btn-primary')
+ .contains('view cart')
+ .should('be.visible');
+ cy.get('div.cx-dialog-buttons a.btn-secondary')
+ .contains('proceed to checkout')
+ .should('be.visible');
+ });
+}
+
+/**
+ * Clicks on 'View Cart' on the product details page.
+ */
+export function clickOnViewCartBtnOnPD(): void {
+ cy.get('div.cx-dialog-buttons a.btn-primary')
+ .contains('view cart')
+ .click()
+ .then(() => {
+ cy.location('pathname').should('contain', '/cart');
+ cy.get('cx-cart-details').should('be.visible');
+ });
+}
+
+/**
+ * Navigates to the product detail page.
+ *
+ * @param {string} shopName - shop name
+ * @param {string} productId - Product ID
+ */
+export function goToPDPage(shopName: string, productId: string): void {
+ const location = `${shopName}/en/USD/product/${productId}/${productId}`;
+ cy.visit(location).then(() => {
+ checkLoadingMsgNotDisplayed();
+ cy.location('pathname').should('contain', location);
+ cy.get('.ProductDetailsPageTemplate').should('be.visible');
+ });
+}
+
+/**
+ * Verifies whether the loading message is not displayed.
+ */
+export function checkLoadingMsgNotDisplayed(): void {
+ cy.log('Wait until the loading notification is not displayed anymore');
+ cy.get('cx-storefront').should('not.contain.value', 'Loading');
+}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
index b4605a355e9..1729b670172 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
@@ -56,20 +56,6 @@ export function goToCPQConfigurationPage(
});
}
-/**
- * Navigates to the product detail page.
- *
- * @param {string} shopName - shop name
- * @param {string} productId - Product ID
- */
-export function goToPDPage(shopName: string, productId: string): void {
- const location = `${shopName}/en/USD/product/${productId}/${productId}`;
- cy.visit(location).then(() => {
- cy.location('pathname').should('contain', location);
- cy.get('.ProductDetailsPageTemplate').should('be.visible');
- });
-}
-
/**
* Clicks on 'Add to Cart' button in catalog list.
*/
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
index 7f7b51e7ee0..d9401d8d128 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
@@ -5,6 +5,7 @@
*/
import * as configuration from './product-configurator';
+import * as common from './common';
const addToCartButtonSelector =
'cx-configurator-add-to-cart-button button.cx-add-to-cart-btn';
@@ -93,21 +94,6 @@ export function registerCreateConfigurationRoute() {
}).as(CREATE_CONFIG_ALIAS.substring(1)); // strip the '@'
}
-/**
- * Navigates to the product detail page.
- *
- * @param {string} shopName - shop name
- * @param {string} productId - Product ID
- */
-export function goToPDPage(shopName: string, productId: string): void {
- const location = `${shopName}/en/USD/product/${productId}/${productId}`;
- cy.visit(location).then(() => {
- checkLoadingMsgNotDisplayed();
- cy.location('pathname').should('contain', location);
- cy.get('.ProductDetailsPageTemplate').should('be.visible');
- });
-}
-
/**
* Navigates to the cart page.
*
@@ -121,14 +107,6 @@ export function goToCart(shopName: string) {
});
}
-/**
- * Verifies whether the loading message is not displayed.
- */
-export function checkLoadingMsgNotDisplayed(): void {
- cy.log('Wait until the loading notification is not displayed anymore');
- cy.get('cx-storefront').should('not.contain.value', 'Loading');
-}
-
/**
* Verifies whether the global message is not displayed on the top of the configuration.
*/
@@ -171,7 +149,7 @@ export function checkGhostAnimationNotDisplayed(): void {
*/
export function checkConfigPageDisplayed(): void {
checkGhostAnimationNotDisplayed();
- checkLoadingMsgNotDisplayed();
+ common.checkLoadingMsgNotDisplayed();
checkGlobalMessageNotDisplayed();
configuration.checkTabBarDisplayed();
configuration.checkGroupTitleDisplayed();
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
index 89e41540429..9cf8c81b78a 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
@@ -6,8 +6,8 @@
import * as login from './login';
import * as configurationCartVc from './product-configurator-cart-vc';
-//import * as configurationCart from './product-configurator-cart';
import * as productSearch from './product-search';
+import * as common from './common';
import { verifyGlobalMessageAfterRegistration } from './register';
const nextBtnSelector =
@@ -487,38 +487,6 @@ export function checkHamburgerDisplayed(): void {
).should('be.visible');
}
-/**
- * Clicks on 'Add to cart' on the product details page.
- */
-export function clickOnAddToCartBtnOnPD(): void {
- cy.get('cx-add-to-cart button.btn-primary')
- .contains('Add to cart')
- .click()
- .then(() => {
- cy.get('cx-added-to-cart-dialog').should('be.visible');
- cy.get('div.cx-dialog-body').should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-secondary')
- .contains('proceed to checkout')
- .should('be.visible');
- });
-}
-
-/**
- * Clicks on 'View Cart' on the product details page.
- */
-export function clickOnViewCartBtnOnPD(): void {
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .click()
- .then(() => {
- cy.location('pathname').should('contain', '/cart');
- cy.get('cx-cart-details').should('be.visible');
- });
-}
-
/**
* Clicks on 'Proceed to Checkout' on the product details page.
*/
@@ -569,7 +537,7 @@ export function completeOrderProcess(productName: string): void {
login.loginUser();
cy.wait(tokenAuthRequestAlias).its('response.statusCode').should('eq', 200);
this.searchForProduct(productName);
- this.clickOnAddToCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
this.clickOnProceedToCheckoutBtnOnPD();
configurationCartVc.checkout();
//TODO: activate after 22.05
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
index 12fcbec1138..d692a8ddef2 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
@@ -144,42 +144,6 @@ export function clickAddToCartButton(shopName: string): void {
});
}
-/**
- * Clicks 'Add to Cart' button on the product details page.
- */
-export function clickOnAddToCartBtnOnPD(): void {
- cy.log("Clicks 'Add to Cart' button on the product details page");
- cy.get('cx-add-to-cart button.btn-primary')
- .contains('Add to cart')
- .click()
- .then(() => {
- cy.get('cx-added-to-cart-dialog').should('be.visible');
- cy.get('div.cx-dialog-body').should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-secondary')
- .contains('proceed to checkout')
- .should('be.visible');
- });
-}
-
-/**
- * Clicks on 'View Cart' on the product details page.
- */
-export function clickOnViewCartBtnOnPD(): void {
- cy.log("Clicks on 'View Cart' on the product details page");
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .click()
- .then(() => {
- cy.log("Verify whether 'Cart details section' is visible");
- cy.get('cx-cart-details').should('be.visible');
- cy.log("Verify whether 'cx-cart-details' is visible");
- cy.get('cx-cart-details').should('be.visible');
- });
-}
-
/**
* Verifies whether the cart contains the product.
*