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:
parent
bf453a6102
commit
6a78ac5807
5 changed files with 7 additions and 7 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
# Environment configuration
|
# Environment configuration
|
||||||
|
|
||||||
# Environment type
|
# Environment type
|
||||||
NODE_ENV="qa"
|
PLAYWRIGHT_ENV="qa"
|
||||||
|
|
||||||
# Skip content site
|
# Skip content site
|
||||||
SKIP_CONTENT_SITE=false
|
SKIP_CONTENT_SITE=false
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Environment configuration
|
# Environment configuration
|
||||||
|
|
||||||
# Environment type
|
# Environment type
|
||||||
NODE_ENV="qa"
|
PLAYWRIGHT_ENV="qa"
|
||||||
|
|
||||||
# Skip content site
|
# Skip content site
|
||||||
SKIP_CONTENT_SITE=false
|
SKIP_CONTENT_SITE=false
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Environment configuration
|
# Environment configuration
|
||||||
|
|
||||||
# Environment type
|
# Environment type
|
||||||
NODE_ENV="qa"
|
PLAYWRIGHT_ENV="qa"
|
||||||
|
|
||||||
# Skip content site
|
# Skip content site
|
||||||
SKIP_CONTENT_SITE=false
|
SKIP_CONTENT_SITE=false
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ export class BasePage {
|
||||||
|
|
||||||
async mockScheduleResponseForEarlyBird(customerDetails: ICustomerDetails) {
|
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) => {
|
await this.page.route(apiUrl, async (route) => {
|
||||||
const currentDate = new Date().toISOString().split('T')[0]; // e.g., "2025-07-23"
|
const currentDate = new Date().toISOString().split('T')[0]; // e.g., "2025-07-23"
|
||||||
if(route.request().postDataJSON().startDate === currentDate) {
|
if(route.request().postDataJSON().startDate === currentDate) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ if (!process.env.CI) {
|
||||||
// Environment variables are present in CI environment, no need to read from file
|
// 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
|
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({
|
dotenv.config({
|
||||||
path: path.join(basePath, '.env.dev'),
|
path: path.join(basePath, '.env.dev'),
|
||||||
example: path.join(basePath, '.env.example')
|
example: path.join(basePath, '.env.example')
|
||||||
|
|
@ -17,7 +17,7 @@ if (!process.env.CI) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dotenv.config({
|
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')
|
example: path.join(basePath, '.env.example')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +42,7 @@ const ortoniReportConfig: OrtoniReportConfig = {
|
||||||
filename: `ortoni_report_${formatDateForFilename(new Date())}.html`,
|
filename: `ortoni_report_${formatDateForFilename(new Date())}.html`,
|
||||||
showProject: false,
|
showProject: false,
|
||||||
projectName: "FMG-Nextgen-Playwright-Report",
|
projectName: "FMG-Nextgen-Playwright-Report",
|
||||||
testType: `E2E- Environment: ${process.env.NODE_ENV} `,
|
testType: `E2E- Environment: ${process.env.PLAYWRIGHT_ENV} `,
|
||||||
preferredTheme: "light",
|
preferredTheme: "light",
|
||||||
base64Image: true,
|
base64Image: true,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue