Skip to content

Commit

Permalink
fix: update REPORTER_CONSTANTS.ts
Browse files Browse the repository at this point in the history
Signed-off-by: mdolhalo <[email protected]>
  • Loading branch information
mdolhalo committed Oct 25, 2023
1 parent 57ca75b commit ec80a7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tests/e2e/configs/mocharc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ module.exports = {
: MOCHA_CONSTANTS.MOCHA_USERSTORY
? [`dist/specs/**/${MOCHA_CONSTANTS.MOCHA_USERSTORY}.spec.js`, `dist/specs/${MOCHA_CONSTANTS.MOCHA_USERSTORY}.spec.js`]
: ['dist/specs/**/**.spec.js', 'dist/specs/**.spec.js'],
retries: MOCHA_CONSTANTS.MOCHA_RETRIES
retries: MOCHA_CONSTANTS.MOCHA_RETRIES,
grep: MOCHA_CONSTANTS.MOCHA_GREP
};
5 changes: 4 additions & 1 deletion tests/e2e/constants/MOCHA_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const MOCHA_CONSTANTS: {
MOCHA_USERSTORY: undefined | string;
MOCHA_RETRIES: string | number;
MOCHA_BAIL: boolean;
MOCHA_GREP: string | undefined;
} = {
MOCHA_DIRECTORY: process.env.MOCHA_DIRECTORY || undefined,

Expand All @@ -30,5 +31,7 @@ export const MOCHA_CONSTANTS: {

MOCHA_RETRIES: process.env.MOCHA_RETRIES || BASE_TEST_CONSTANTS.TEST_ENVIRONMENT === '' ? 0 : 2,

MOCHA_SUITE: process.env.MOCHA_SUITE || undefined
MOCHA_SUITE: process.env.MOCHA_SUITE || undefined,

MOCHA_GREP: process.env.MOCHA_GREP || undefined
};
9 changes: 4 additions & 5 deletions tests/e2e/constants/REPORTER_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const REPORTER_CONSTANTS: {
/**
* user name on ReportPortal
*/
RP_USER: process.env.RP_USER || process.env.USER || 'superadmin',
RP_USER: process.env.RP_USER || process.env.USER || process.env.BUILD_USER_ID || 'superadmin',

/**
* launch name to save report
Expand Down Expand Up @@ -137,10 +137,9 @@ export const REPORTER_CONSTANTS: {
* project name to save launch
*/
RP_PROJECT: (): string => {
const project: string =
BASE_TEST_CONSTANTS.TEST_ENVIRONMENT !== '' || REPORTER_CONSTANTS.RP_USE_PERSONAL
? `${REPORTER_CONSTANTS.RP_USER}_personal`
: BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME();
const project: string = REPORTER_CONSTANTS.RP_USE_PERSONAL
? `${REPORTER_CONSTANTS.RP_USER}_personal`
: BASE_TEST_CONSTANTS.TESTING_APPLICATION_NAME();
return process.env.RP_PROJECT || project;
}
};

0 comments on commit ec80a7b

Please sign in to comment.