Skip to content

Commit dc618af

Browse files
committed
FI-1712 fix: print absolute paths to HTML report and lite report in docker
1 parent 1dd84f2 commit dc618af

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

autotests/configurator/mapLogPayloadInConsole.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const mapLogPayloadInConsole: MapLogPayloadInConsole = (message, payload)
1919

2020
if (
2121
message.startsWith('Caught an error when running tests in retry') ||
22-
message.startsWith('Usage:')
22+
message.startsWith('Usage:') ||
23+
message.includes('report was written')
2324
) {
2425
return payload;
2526
}

src/utils/report/writeHtmlReport.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import {join} from 'node:path';
22

3-
import {REPORTS_DIRECTORY_PATH} from '../../constants/internal';
3+
import {
4+
ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY,
5+
REPORTS_DIRECTORY_PATH,
6+
} from '../../constants/internal';
47

58
import {assertValueIsNotNull} from '../asserts';
69
import {getFileSize, writeFile} from '../fs';
@@ -25,7 +28,11 @@ export const writeHtmlReport = async (reportData: ReportData): Promise<void> =>
2528

2629
assertValueIsNotNull(reportFileName, 'reportFileName is not null');
2730

28-
const reportFilePath = join(REPORTS_DIRECTORY_PATH, reportFileName) as FilePathFromRoot;
31+
const reportFilePath = join(
32+
ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY,
33+
REPORTS_DIRECTORY_PATH,
34+
reportFileName,
35+
) as FilePathFromRoot;
2936

3037
await writeFile(reportFilePath, String(reportHtml));
3138

src/utils/report/writeLiteJsonReport.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import {join} from 'node:path';
22

3-
import {REPORTS_DIRECTORY_PATH} from '../../constants/internal';
3+
import {
4+
ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY,
5+
REPORTS_DIRECTORY_PATH,
6+
} from '../../constants/internal';
47

58
import {getFileSize, writeFile} from '../fs';
69
import {generalLog} from '../generalLog';
@@ -21,7 +24,11 @@ export const writeLiteJsonReport = async (liteReport: LiteReport): Promise<void>
2124
const {liteReportFileName} = liteReport;
2225
const reportJson = JSON.stringify(liteReport);
2326

24-
const reportFilePath = join(REPORTS_DIRECTORY_PATH, liteReportFileName) as FilePathFromRoot;
27+
const reportFilePath = join(
28+
ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY,
29+
REPORTS_DIRECTORY_PATH,
30+
liteReportFileName,
31+
) as FilePathFromRoot;
2532

2633
await writeFile(reportFilePath, reportJson);
2734

0 commit comments

Comments
 (0)