Skip to content

Commit 9ad4707

Browse files
committed
fix report
1 parent 574742b commit 9ad4707

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/processSnapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
872872
try {
873873
const cssRules = parseCSSFile(processedOptions.customCSS);
874874
const validationResult = await validateCSSSelectors(page, cssRules, ctx.log);
875-
const report = generateCSSInjectionReport(validationResult, ctx.log);
875+
const report = generateCSSInjectionReport(validationResult, ctx.log, snapshot.name);
876876

877877
if (validationResult.failedSelectors.length > 0) {
878878
validationResult.failedSelectors.forEach(selector => {

src/lib/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,11 +1123,12 @@ export function generateCSSInjectionReport(
11231123
failedSelectors: string[];
11241124
totalRules: number;
11251125
},
1126-
logger: any
1126+
logger: any,
1127+
snapshotName: string
11271128
): string {
11281129
const lines: string[] = [];
11291130

1130-
lines.push(chalk.cyan('[SmartUI] CSS Injection Report:'));
1131+
lines.push(chalk.cyan(`[SmartUI] CSS Injection Report for Snapshot: ${snapshotName}`));
11311132

11321133
if (validationResult.successCount > 0) {
11331134
lines.push(chalk.green(`[SmartUI] ✅ Success: ${validationResult.successCount} rules applied.`));

0 commit comments

Comments
 (0)