Renames NODE_ENV to PLAYWRIGHT_ENV

Updates the environment variable name from NODE_ENV to PLAYWRIGHT_ENV across the project.

This change ensures consistency and clarity in environment variable usage, specifically for Playwright configurations.
This commit is contained in:
maguire-arman 2025-08-05 13:34:58 -04:00
parent bf453a6102
commit 6a78ac5807
5 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
# Environment configuration
# Environment type
NODE_ENV="qa"
PLAYWRIGHT_ENV="qa"
# Skip content site
SKIP_CONTENT_SITE=false

View file

@ -2,7 +2,7 @@
# Environment configuration
# Environment type
NODE_ENV="qa"
PLAYWRIGHT_ENV="qa"
# Skip content site
SKIP_CONTENT_SITE=false

View file

@ -2,7 +2,7 @@
# Environment configuration
# Environment type
NODE_ENV="qa"
PLAYWRIGHT_ENV="qa"
# Skip content site
SKIP_CONTENT_SITE=false

View file

@ -104,7 +104,7 @@ export class BasePage {
async mockScheduleResponseForEarlyBird(customerDetails: ICustomerDetails) {
const apiUrl = `https://digitalapi.${process.env['NODE_ENV']!.replace('sys', 'test').toLowerCase()}.safelite.io/schedule/api/v1/schedule/mobile-time-slots`;
const apiUrl = `https://digitalapi.${process.env['PLAYWRIGHT_ENV']!.replace('sys', 'test').toLowerCase()}.safelite.io/schedule/api/v1/schedule/mobile-time-slots`;
await this.page.route(apiUrl, async (route) => {
const currentDate = new Date().toISOString().split('T')[0]; // e.g., "2025-07-23"
if(route.request().postDataJSON().startDate === currentDate) {

View file

@ -9,7 +9,7 @@ if (!process.env.CI) {
// Environment variables are present in CI environment, no need to read from file
const basePath = __dirname; // This gets the directory where the config file is located
if (process.env.NODE_ENV == 'undefined' || process.env.NODE_ENV == null) {
if (process.env.PLAYWRIGHT_ENV == 'undefined' || process.env.PLAYWRIGHT_ENV == null) {
dotenv.config({
path: path.join(basePath, '.env.dev'),
example: path.join(basePath, '.env.example')
@ -17,7 +17,7 @@ if (!process.env.CI) {
}
else {
dotenv.config({
path: path.join(basePath, `.env.${process.env.NODE_ENV}`),
path: path.join(basePath, `.env.${process.env.PLAYWRIGHT_ENV}`),
example: path.join(basePath, '.env.example')
});
}
@ -42,7 +42,7 @@ const ortoniReportConfig: OrtoniReportConfig = {
filename: `ortoni_report_${formatDateForFilename(new Date())}.html`,
showProject: false,
projectName: "FMG-Nextgen-Playwright-Report",
testType: `E2E- Environment: ${process.env.NODE_ENV} `,
testType: `E2E- Environment: ${process.env.PLAYWRIGHT_ENV} `,
preferredTheme: "light",
base64Image: true,
}