diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 2f74a61..a2fa622 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,6 @@ +# 0.15.1 +- fixed nano seconds conversion + # 0.15.0 - migrated to react 18 and vite dev server - added displaying of execution time for steps and scenarios diff --git a/formatter/json_formatter.js b/formatter/json_formatter.js index ece0c0c..f06b5f0 100644 --- a/formatter/json_formatter.js +++ b/formatter/json_formatter.js @@ -43,7 +43,7 @@ class JsonFormatter extends Formatter { const result= testCase.stepResults[step.id]; step.result = { status: result.status.toLowerCase(), - duration: result.duration.seconds * 1_000_000 + result.duration.nanos, + duration: result.duration.seconds * 1_000_000_000 + result.duration.nanos, error_message: result.message }; step.embeddings = testCase.stepAttachments[step.id]?.map(attachment => ({ diff --git a/package-lock.json b/package-lock.json index 68f7e57..b0d7bcc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@qavajs/html-formatter", - "version": "0.15.0", + "version": "0.15.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@qavajs/html-formatter", - "version": "0.15.0", + "version": "0.15.1", "devDependencies": { "@cucumber/cucumber": "^10.0.1", "@epam/assets": "latest", diff --git a/package.json b/package.json index f67483b..87c9220 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@qavajs/html-formatter", - "version": "0.15.0", + "version": "0.15.1", "main": "formatter/formatter.js", "authors": [ "Alexandr Galichenko", diff --git a/src/components/Scenario.tsx b/src/components/Scenario.tsx index f0acbdb..eaee723 100644 --- a/src/components/Scenario.tsx +++ b/src/components/Scenario.tsx @@ -7,7 +7,7 @@ import {TimeLabel} from "./TimeLabel"; const filterByStatus = (scenario: any, status: string) => scenario.steps.filter((step: any) => step.result.status === status); const getScenarioDuration = (scenario: any) => { - return `${(scenario.steps.reduce((duration: number, step: any) => duration + (step?.result.duration ?? 0), 0) / 1_000_000).toFixed(2)}s` + return `${(scenario.steps.reduce((duration: number, step: any) => duration + (step?.result.duration ?? 0), 0) / 1_000_000_000).toFixed(2)}s` } const scenarioTitle = (scenario: any) => function ScenarioTitle() { const passed = filterByStatus(scenario, "passed").length; diff --git a/src/components/Step.tsx b/src/components/Step.tsx index 9ba39fb..568be98 100644 --- a/src/components/Step.tsx +++ b/src/components/Step.tsx @@ -99,7 +99,7 @@ export const Step = ({step}: {step: any}) => { />) } - +
{step.arguments && step.arguments.map((arg: any, index: number) => )}