From 03fdbafb65855a589a81a0d33102a5c7797076d8 Mon Sep 17 00:00:00 2001 From: Alexander Pilarczyk <54265591+alepil@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:01:14 +0100 Subject: [PATCH] chore: fix product-configuration b2c/b2b/cpq test scans on ccv2 environment (18550) (#18550) fixes failing scans like https://gkeeccommercecloud.jaas-gcp.cloud.sap.corp/job/testing-framework/job/test-runner/49401/display/redirect Closes #18550 --- run-spartacus-product-configurator-e2es.sh | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/run-spartacus-product-configurator-e2es.sh b/run-spartacus-product-configurator-e2es.sh index c48c6ff9159..ea1d1f37641 100755 --- a/run-spartacus-product-configurator-e2es.sh +++ b/run-spartacus-product-configurator-e2es.sh @@ -1,4 +1,32 @@ #!/bin/bash +# This script is invoked from https://github.tools.sap/cx-commerce/wonderful-testing-framework/blob/main/resources/wtf/config.yaml +# By default, the e2es for b2c product-configurator will be executed without parameters. +# Supported options include "cpq", "b2c" and "b2c_flaky" + +param=${1:-"b2c"} # Default to "b2c" if no parameter provided + +# Update variables based on the provided parameter +case "$param" in + "cpq") + export E2E_BASE_SITE="powertools-spa" + export ENDPOINT_URL_PUBLIC_SPARTACUS=$ENDPOINT_URL_PUBLIC_SPA_POWERTOOLS + export E2ES_TO_RUN="'cypress/e2e/**/cpq-configuration.ccv2-e2e.cy.ts'" + ;; + "b2c") + export E2E_BASE_SITE="electronics-spa" + export E2ES_TO_RUN="'cypress/e2e/**/product_configurator/*-configurator*e2e.cy.ts'" + ;; + "b2c_flaky") + export E2E_BASE_SITE="electronics-spa" + export E2ES_TO_RUN="'cypress/e2e/**/*-configurator*e2e*flaky.cy.ts'" + ;; + *) + echo "Invalid parameter. Please provide a valid parameter." + exit 1 + ;; +esac + + # Install cypress standalone dependencies (cd projects/storefrontapp-e2e-cypress && npm install)