test: add failing test for node text bleed-through stacking issue

Adds a test verifying that CSS containment (`contain-layout contain-style`)
is applied to the inner wrapper rather than the outer node container, and
that the outer container uses `isolation: isolate`.

Currently fails because containment is on the outer container and
isolation is missing — this causes text from lower z-index nodes to
bleed through higher z-index nodes (#9988).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dante01yoon
2026-03-16 16:03:55 +09:00
parent 06f7e13957
commit feb8555013

View File

@@ -251,4 +251,26 @@ describe('LGraphNode', () => {
)
expect(wrapper.element.style.getPropertyValue('--node-height-x')).toBe('')
})
it('should isolate stacking context on outer container and apply containment only to inner wrapper', () => {
const wrapper = mountLGraphNode({ nodeData: mockNodeData })
const outerClasses = wrapper.classes()
const innerWrapper = wrapper.find('[data-testid="node-inner-wrapper"]')
const innerClasses = innerWrapper.classes()
// Outer container must have isolation: isolate to prevent text
// from lower z-index nodes bleeding through (see #9988).
expect(outerClasses).toContain('isolate')
// CSS containment must NOT be on the outer container because it
// interferes with inter-node stacking compositing.
expect(outerClasses).not.toContain('contain-layout')
expect(outerClasses).not.toContain('contain-style')
// CSS containment belongs on the inner wrapper for performance
// without affecting stacking between sibling nodes.
expect(innerClasses).toContain('contain-layout')
expect(innerClasses).toContain('contain-style')
})
})