Skip to content

Commit

Permalink
fix: add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent authored Jan 7, 2024
1 parent 0a0d590 commit 1ec4c64
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,9 @@ module.exports = (config) => {
for (test of testTempIdArr) {
for (step of test.testSteps) {
const stepTitle = step.args ? `[STEP] - ${step.actor} ${step.name} ${JSON.stringify(step.args.map(item => item && item._secret ? '*****' : JSON.stringify(item)).join(' '))}` : `[STEP] - ${step.actor} ${step.name}`;

let stepObj;
// add some delay for step to be logged
setTimeout(async () => {
stepObj = await startTestItem(launchObj.tempId, stepTitle.slice(0, 300), rp_STEP, test.testTempId);
}, 500);

await sleep(1);
const stepObj = await startTestItem(launchObj.tempId, stepTitle.slice(0, 300), rp_STEP, test.testTempId);

stepObj.status = step.status || rp_PASSED;
await finishStepItem(stepObj);
Expand Down

0 comments on commit 1ec4c64

Please sign in to comment.