Skip to content

Commit 206761a

Browse files
committed
test(sqllab): assert selected-word override carries border + !important
1 parent 48aba96 commit 206761a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ test('themes the selected-word occurrence markers from the theme', () => {
7171
// The default theme leaves `colorEditorSelection` unset, so the marker uses
7272
// the documented `colorPrimaryBgHover` fallback.
7373
expect(styles).toContain(supersetTheme.colorPrimaryBgHover);
74+
// The override also restyles the marker border from the theme...
75+
expect(styles).toContain(supersetTheme.colorBorder);
76+
// ...and carries `!important`, which is what lets it win over Ace's bundled
77+
// non-important `.ace-github .ace_marker-layer .ace_selected-word` near-white
78+
// rule regardless of stylesheet order (the effective-cascade guarantee that
79+
// jsdom cannot verify by computed style).
80+
expect(styles).toContain('!important');
7481
});
7582

7683
// Collect every CSS rule the render injected: emotion's Global styles land in

0 commit comments

Comments
 (0)