Uses env var to control content site execution
Updates the workflow to conditionally execute the content site (home page) based on the SKIP_CONTENT_SITE environment variable. This allows for skipping the content site in specific environments. Also, removes unused test data properties.
This commit is contained in:
parent
87b7b8158b
commit
ae4c26499b
2 changed files with 7 additions and 8 deletions
|
|
@ -19,4 +19,6 @@ CCIS_API_URL="https://api.test.belronus.io"
|
|||
ADMIN_SERVICE_API_URL="https://issadminapi.dev.sagaws.net/iss-admin/api/v1/"
|
||||
|
||||
# API authentication (replace with actual value when running tests)
|
||||
CCIS_API_AUTH="undefined"
|
||||
CCIS_API_AUTH="undefined"
|
||||
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
|
@ -156,12 +156,9 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
|
||||
// Destructure test data for easier access
|
||||
const {
|
||||
servicePackage, paymentMethod, customerDetails, vehicleDetails, vehicleDamage,
|
||||
appointmentDetails, paymentDetails, claimDetails, partQuestions, enterFunnelWithZip,
|
||||
capabilityQuestions, vehiclePartQuestions, moldingQuestions, isPolicyFound,
|
||||
otherVehiclesOnPolicy, isUseVehicleOnPolicy, isDuplicateClaim, isRecalNotification,
|
||||
alertFlags, endorsements, isPolicyDriver, skipEstimatePage, isRecalVehicle, canNotRecal,
|
||||
dynamicRecal, hasOemEndorsement, promoCode
|
||||
paymentMethod, customerDetails, vehicleDetails, vehicleDamage,
|
||||
paymentDetails, partQuestions, enterFunnelWithZip, capabilityQuestions,
|
||||
vehiclePartQuestions, moldingQuestions, skipEstimatePage
|
||||
} = testCase.testData;
|
||||
|
||||
// Check if the vehicle damage includes a windshield crack
|
||||
|
|
@ -172,7 +169,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
//============================= TEST WORKFLOW STEPS =============================
|
||||
|
||||
// Execute home page for qa and dev environments (skip for sys)
|
||||
if (process.env.NODE_ENV !== 'sys') {
|
||||
if (process.env.SKIP_CONTENT_SITE == "false") {
|
||||
await test.step('HomePage >> Lets Get Started', async () => {
|
||||
let homePage = testCase.pages.homePage;
|
||||
console.log(`Customer for this test: ${customerDetails?.firstName} ${customerDetails?.lastName}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue