Skip to content

Commit 2f1856a

Browse files
Alice K.Synar
Alice K.
authored andcommitted
front: use e2e-logger in e2e pdf loading errors
Signed-off-by: Alice K. <[email protected]>
1 parent baa00c0 commit 2f1856a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

front/tests/utils/simulationSheet.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { expect } from '@playwright/test';
55
import { getDocument } from 'pdfjs-dist/legacy/build/pdf.mjs';
66

77
import type { Simulation } from './types';
8+
import { logger } from '../logging-fixture';
89

910
/**
1011
* Find the first PDF file in a directory.
@@ -15,12 +16,12 @@ export function findFirstPdf(directory: string): string | null {
1516
try {
1617
const pdfFile = fs.readdirSync(directory).find((file) => file.endsWith('.pdf'));
1718
if (!pdfFile) {
18-
console.error(`No PDF files found in directory: ${directory}`);
19+
logger.error(`No PDF files found in directory: ${directory}`);
1920
return null;
2021
}
2122
return path.resolve(directory, pdfFile);
2223
} catch (error) {
23-
console.error(`Error reading directory: ${directory}`, error);
24+
logger.error(`Error reading directory: ${directory}`, error);
2425
return null;
2526
}
2627
}

0 commit comments

Comments
 (0)