Skip to content

Commit b8ec243

Browse files
sadpandajoeclaude
andcommitted
test(dashboard): strengthen fontWeightStrong assertion for markdown bold
Update test to require fontWeightStrong >= 600 (semibold) instead of > 400. This ensures the theme token has adequate weight to show a true visual difference when bold text is rendered. Values < 600 (like 500/medium) are too subtle and appear similar to normal weight (400), making bold text barely distinguishable. The stricter assertion catches this inadequate configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bf830b2 commit b8ec243

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ test('should have fontWeightStrong in theme for bold markdown rendering', async
426426
},
427427
});
428428

429-
// CRITICAL: Verify fontWeightStrong exists in the theme
429+
// CRITICAL: Verify fontWeightStrong exists in the theme with adequate weight
430430
// If it's missing from allowedAntdTokens, GlobalStyles.tsx:66 will set
431431
// font-weight: undefined on <strong> tags, breaking bold markdown rendering
432-
// Ant Design default is 600, backend config sets 500, either is acceptable
432+
// Must be >= 600 (semibold) to show a true visual difference when bolded
433+
// Values < 600 (like 500/medium) are too subtle and appear similar to normal (400)
433434
expect(supersetTheme.fontWeightStrong).toBeDefined();
434-
expect(supersetTheme.fontWeightStrong).toBeGreaterThan(400);
435+
expect(supersetTheme.fontWeightStrong).toBeGreaterThanOrEqual(600);
435436
});

0 commit comments

Comments
 (0)