Objective
What to automate
Write one spec that exercises the open action and shadow form, then asserts the closed host boundary without reaching for its internal button.
Preconditions and test data
Preconditions
- Use a fresh isolated Practice Lab browser context.
- Open the fixture identified by FX-SHD-001.
Test data
open actionshadow form name: Asha Learnerclosed host: closed-shadow-host
Expected result
The spec passes through open roots and proves the closed root exposes no public shadowRoot or scoped internal button.
Progressive hints
Hint 1
Use accessible locators for open-root interactions.
Hint 2
Assert the visible status outcomes before checking the boundary.
Hint 3
Treat the closed host attributes as the contract, not its internal markup.
I’ve tried it — show solution
- Use accessible locators for open-root interactions.
- Assert the visible status outcomes before checking the boundary.
- Treat the closed host attributes as the contract, not its internal markup.
The deliberately failing starter is in tests/shadow-dom.spec.ts inside the TypeScript starter ZIP.