Skip to content

Commit 199be3d

Browse files
committed
test(layout-engine): assert field underline preserved when overlay is off (SD-3330)
Sharpen the atomic-run regression: beyond checking no overlay is produced, assert the field annotation's own underline is not suppressed (textDecorationLine not forced to 'none'), via the aria-label selector.
1 parent ba2955f commit 199be3d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/layout-engine/painters/dom/src/index.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,13 @@ describe('DomPainter', () => {
852852
pmEnd: 1,
853853
},
854854
]);
855+
856+
// Sharper than just "no overlay": the field's own underline must not be suppressed. The overlay's
857+
// suppression path forces textDecorationLine to 'none' on the run's element; with the overlay off
858+
// it keeps its native value.
859+
const fieldEl = mount.querySelector('[aria-label="Field annotation"]') as HTMLElement;
860+
expect(fieldEl).toBeTruthy();
861+
expect(fieldEl.style.textDecorationLine).not.toBe('none');
855862
});
856863

857864
it('paints one measured overlay for underlined text + tabs on the segment-positioned path', () => {

0 commit comments

Comments
 (0)