From b8ec243d24eb2bf7bd0e35153c4b0267a35c19b8 Mon Sep 17 00:00:00 2001 From: Joe Li Date: Tue, 28 Oct 2025 09:33:25 -0700 Subject: [PATCH] test(dashboard): strengthen fontWeightStrong assertion for markdown bold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../components/gridComponents/Markdown/Markdown.test.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx index dde4cf62dbe6..5f298b192d1a 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx @@ -426,10 +426,11 @@ test('should have fontWeightStrong in theme for bold markdown rendering', async }, }); - // CRITICAL: Verify fontWeightStrong exists in the theme + // CRITICAL: Verify fontWeightStrong exists in the theme with adequate weight // If it's missing from allowedAntdTokens, GlobalStyles.tsx:66 will set // font-weight: undefined on tags, breaking bold markdown rendering - // Ant Design default is 600, backend config sets 500, either is acceptable + // Must be >= 600 (semibold) to show a true visual difference when bolded + // Values < 600 (like 500/medium) are too subtle and appear similar to normal (400) expect(supersetTheme.fontWeightStrong).toBeDefined(); - expect(supersetTheme.fontWeightStrong).toBeGreaterThan(400); + expect(supersetTheme.fontWeightStrong).toBeGreaterThanOrEqual(600); });