Adds skip content site functionality.
Allows skipping the content site (home page) based on an environment variable. This provides flexibility in test execution, enabling tests to bypass the home page when it's not relevant to the specific scenario being tested. The SKIP_CONTENT_SITE environment variable controls whether to skip the content site.
This commit is contained in:
parent
d26885d0f0
commit
2510f3c9de
2 changed files with 7 additions and 2 deletions
|
|
@ -4,9 +4,13 @@
|
|||
# Environment type
|
||||
NODE_ENV="qa"
|
||||
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
||||
# Base URLs by environment (uncomment the one you need)
|
||||
# qa
|
||||
BASE_URL="https://www-qa2.safelite.com/"
|
||||
# qa with skipToInsurance Turned Off
|
||||
# BASE_URL="https://fixmyglassqa.safelite.com/?cns=all&experiments=ConceptFunnel=ConceptFunnel_V1=ConceptFunnel_VinAndEmailOptional=true,NextGen_IGQSkipToInsurance=NextGen_IGQSkipToInsurance_V1=NextGen_IGQSkipToInsurance_CONTROL=true"
|
||||
# sys
|
||||
# BASE_URL="https://www-test2.safelite.com/fmg/?fmgPage=vehicle"
|
||||
# dev
|
||||
|
|
|
|||
|
|
@ -192,8 +192,9 @@ 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') {
|
||||
// Use Environment Variable to decide whether or not we want to skip content site aka home page
|
||||
|
||||
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