Skip to content

Commit

Permalink
fix: some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Dec 21, 2023
1 parent 00e9015 commit 2a6f8f0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,7 @@ module.exports = (config) => {
const stepArgs = step.agrs ? step.agrs : step.args;

// if arg is typeof Secret, mask its value, if arg is an object, stringify it, otherwise leave it as it is
let stepTitle = stepArgs ? `[STEP] - ${step.actor} ${step.name} ${JSON.stringify(stepArgs.map(item => item && item._secret ? '*****' : (typeof item === 'object') ? JSON.stringify(item) : item).join(' '))}` : `[STEP] - ${step.actor} ${step.name}`;

// reportportal accepts the step name with length less than 1025
if (stepTitle.length > 1024) {
stepTitle = stepTitle.slice(0, 124);
}
const stepTitle = stepArgs ? `[STEP] - ${step.actor} ${step.name} ${JSON.stringify(stepArgs.map(item => item && item._secret ? '*****' : (typeof item === 'object') ? JSON.stringify(item) : item).join(' '))}` : `[STEP] - ${step.actor} ${step.name}`;

const stepObj = await startTestItem(launchObj.tempId, stepTitle, rp_STEP, test.testTempId);
stepObj.status = step.status || rp_PASSED;
Expand Down

0 comments on commit 2a6f8f0

Please sign in to comment.