[bugfix] playload uncorrect path (#958)
* stash * fix bug by using relative path * add changelog and bump version
This commit is contained in:
Родитель
a7186f1ba7
Коммит
7af1579585
|
@ -7,6 +7,7 @@
|
|||
- Support `--scope` option in static generator
|
||||
- API Scenario
|
||||
- Skip create and delete resource group if specify resource group name
|
||||
- bug fix about incorrect payload file path in html report
|
||||
|
||||
## 01/30/2023 3.2.4
|
||||
|
||||
|
|
|
@ -156,7 +156,10 @@ export class CoverageView {
|
|||
? `${this.specLinkPrefix}/${element.specFilePath?.substring(
|
||||
element.specFilePath?.indexOf("specification")
|
||||
)}#L${error.source.position.line}`
|
||||
: `${element.specFilePath}#L${error.source.position.line}`,
|
||||
: path.relative(
|
||||
__dirname,
|
||||
`../../${element.specFilePath}#L${error.source.position.line}`
|
||||
),
|
||||
pathsInPayload: error.pathsInPayload,
|
||||
jsonPathsInPayload: error.jsonPathsInPayload,
|
||||
severity: error.severity,
|
||||
|
@ -167,7 +170,10 @@ export class CoverageView {
|
|||
: element.payloadFilePath,
|
||||
payloadFilePathWithPosition: this.overrideLinkInReport
|
||||
? `${this.payloadLinkPrefix}/${payloadFile}#L${element.payloadFilePathPosition?.line}`
|
||||
: `${element.payloadFilePath}#L${element.payloadFilePathPosition?.line}`,
|
||||
: path.relative(
|
||||
__dirname,
|
||||
`../../${element.payloadFilePath}#L${element.payloadFilePathPosition?.line}`
|
||||
),
|
||||
payloadFileLinkLabel: payloadFile,
|
||||
});
|
||||
});
|
||||
|
@ -178,7 +184,10 @@ export class CoverageView {
|
|||
payloadFileLinkLabel: payloadFile,
|
||||
payloadFilePathWithPosition: this.overrideLinkInReport
|
||||
? `${this.payloadLinkPrefix}/${payloadFile}#L${element.payloadFilePathPosition?.line}`
|
||||
: `${element.payloadFilePath}#L${element.payloadFilePathPosition?.line}`,
|
||||
: path.relative(
|
||||
__dirname,
|
||||
`../../${element.payloadFilePath}#L${element.payloadFilePathPosition?.line}`
|
||||
),
|
||||
errors: element.errors,
|
||||
specFilePath: this.overrideLinkInReport
|
||||
? `${this.specLinkPrefix}/${element.specFilePath?.substring(
|
||||
|
@ -196,7 +205,7 @@ export class CoverageView {
|
|||
? `${this.specLinkPrefix}/${element.spec?.substring(
|
||||
element.spec?.indexOf("specification")
|
||||
)}`
|
||||
: element.spec;
|
||||
: path.relative(__dirname, `../../${element.spec}`);
|
||||
this.coverageResultsForRendering.push({
|
||||
spec: specLink,
|
||||
specLinkLabel: element.spec?.substring(element.spec?.lastIndexOf("/") + 1),
|
||||
|
@ -263,7 +272,10 @@ export class CoverageView {
|
|||
? `${this.specLinkPrefix}/${element[0].specFilePath?.substring(
|
||||
element[0].specFilePath?.indexOf("specification")
|
||||
)}#L${element[0]!.operationInfo!.position!.line}`
|
||||
: `${element[0].specFilePath}#L${element[0]!.operationInfo!.position!.line}`,
|
||||
: path.relative(
|
||||
__dirname,
|
||||
`../../${element[0].specFilePath}#L${element[0]!.operationInfo!.position!.line}`
|
||||
),
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче