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
|
|
@ -20,3 +20,5 @@ ADMIN_SERVICE_API_URL="https://issadminapi.dev.sagaws.net/iss-admin/api/v1/"
|
||||||
|
|
||||||
# API authentication (replace with actual value when running tests)
|
# 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
|
// Destructure test data for easier access
|
||||||
const {
|
const {
|
||||||
servicePackage, paymentMethod, customerDetails, vehicleDetails, vehicleDamage,
|
paymentMethod, customerDetails, vehicleDetails, vehicleDamage,
|
||||||
appointmentDetails, paymentDetails, claimDetails, partQuestions, enterFunnelWithZip,
|
paymentDetails, partQuestions, enterFunnelWithZip, capabilityQuestions,
|
||||||
capabilityQuestions, vehiclePartQuestions, moldingQuestions, isPolicyFound,
|
vehiclePartQuestions, moldingQuestions, skipEstimatePage
|
||||||
otherVehiclesOnPolicy, isUseVehicleOnPolicy, isDuplicateClaim, isRecalNotification,
|
|
||||||
alertFlags, endorsements, isPolicyDriver, skipEstimatePage, isRecalVehicle, canNotRecal,
|
|
||||||
dynamicRecal, hasOemEndorsement, promoCode
|
|
||||||
} = testCase.testData;
|
} = testCase.testData;
|
||||||
|
|
||||||
// Check if the vehicle damage includes a windshield crack
|
// Check if the vehicle damage includes a windshield crack
|
||||||
|
|
@ -172,7 +169,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
//============================= TEST WORKFLOW STEPS =============================
|
//============================= TEST WORKFLOW STEPS =============================
|
||||||
|
|
||||||
// Execute home page for qa and dev environments (skip for sys)
|
// 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 () => {
|
await test.step('HomePage >> Lets Get Started', async () => {
|
||||||
let homePage = testCase.pages.homePage;
|
let homePage = testCase.pages.homePage;
|
||||||
console.log(`Customer for this test: ${customerDetails?.firstName} ${customerDetails?.lastName}`);
|
console.log(`Customer for this test: ${customerDetails?.firstName} ${customerDetails?.lastName}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue