Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion formatter/json_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ({
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qavajs/html-formatter",
"version": "0.15.0",
"version": "0.15.1",
"main": "formatter/formatter.js",
"authors": [
"Alexandr Galichenko",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const Step = ({step}: {step: any}) => {
/>)
}
<FlexSpacer/>
<TimeLabel time={`${(step.result.duration / 1_000_000).toFixed(2)}s`}/>
<TimeLabel time={`${(step.result.duration / 1_000_000_000).toFixed(2)}s`}/>
</FlexRow>
<div style={{display: 'flex'}}>
{step.arguments && step.arguments.map((arg: any, index: number) => <Argument key={index} arg={arg}/>)}
Expand Down