Merge pull request #2732 from Safelite/node-env-fix
Renames NODE_ENV to PLAYWRIGHT_ENV
This commit is contained in:
commit
a732b878b8
5 changed files with 7 additions and 7 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# Environment configuration
|
||||
|
||||
# Environment type
|
||||
NODE_ENV="qa"
|
||||
PLAYWRIGHT_ENV="qa"
|
||||
|
||||
# Skip content site
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Environment configuration
|
||||
|
||||
# Environment type
|
||||
NODE_ENV="qa"
|
||||
PLAYWRIGHT_ENV="qa"
|
||||
|
||||
# Skip content site
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Environment configuration
|
||||
|
||||
# Environment type
|
||||
NODE_ENV="qa"
|
||||
PLAYWRIGHT_ENV="qa"
|
||||
|
||||
# Skip content site
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue