feat(overview): adopt delivered theme patch and record UI validation

This commit is contained in:
Joseph Doherty
2026-11-13 17:32:32 -05:00
parent d8d633ddb2
commit f698f97889
99 changed files with 11587 additions and 26 deletions
@@ -0,0 +1,26 @@
from playwright.sync_api import sync_playwright
from pathlib import Path
import json
out=Path(__file__).resolve().parent
with sync_playwright() as p:
b=p.chromium.launch(channel='chromium',headless=True);page=b.new_page(viewport={'width':390,'height':844},reduced_motion='reduce')
page.request.post('http://127.0.0.1:5200/canary/scene/mixed')
page.goto('http://127.0.0.1:5200/');page.wait_for_selector('html[data-overview-ready="true"]')
page.get_by_test_id('attention-filter').check();page.get_by_test_id('attention-summary').filter(has_text='Showing 5 of 7').wait_for()
(out/'accessibility-tree.txt').write_text(page.locator('body').aria_snapshot())
assert page.get_by_role('checkbox',name='Needs attention').is_checked()
assert page.get_by_role('button',name='Pause view updates').get_attribute('aria-pressed')=='false'
# Chromium exposes native summary as DisclosureTriangle, not ARIA button.
c=page.context.new_cdp_session(page);tree=c.send('Accessibility.getFullAXTree')
nodes=[n for n in tree['nodes'] if n.get('name',{}).get('value')=='Toggle navigation']
assert nodes and nodes[0]['role']['value']=='DisclosureTriangle'
(out/'navigation-accessibility-node.json').write_text(json.dumps(nodes,indent=2))
nav=page.locator('summary.rail-toggle');nav.focus();page.keyboard.press('Enter')
page.wait_for_function("document.querySelector('details.app-shell').open")
page.keyboard.press('Enter');page.wait_for_function("!document.querySelector('details.app-shell').open")
page.request.post('http://127.0.0.1:5200/canary/scene/pending')
page.get_by_test_id('attention-empty').wait_for();assert page.get_by_test_id('attention-pending').is_visible()
page.get_by_test_id('attention-clear').click();page.wait_for_function("document.activeElement?.id==='overview-needs-attention'")
assert page.get_by_test_id('instance-card').count()==1
(out/'focused-accessibility.json').write_text(json.dumps({'accessibleNamesStates':'browser accessibility tree recorded','nativeRailKeyboardToggle':True,'pendingNoMatchAndClearFocus':True,'readerLimit':'Accessibility tree/roles and live-region semantics verified; no claim of a human VoiceOver/NVDA listening session.','harnessCorrection':'Initial role=button lookup did not match native DisclosureTriangle; actual Chromium AX node proves name, focusability and expanded state. No product change.'},indent=2))
print('Focused accessible names/state/keyboard/no-match verified');b.close()