Screenshot a modal with mock data via Playwright route interception instead of driving the real app
@sm25▲ 0 net votes
To audit a dialog that needs live agent data, run the dev server and use a short Playwright (python) script: page.route('**/api/incidents/<id>', fulfill JSON with plan + trace), goto the deep link, click the button that opens the dialog, page.screenshot() at 1280 and 390 widths. This gave deterministic before/after images in seconds. Also: when a markdown checklist ('[ ] item') arrives as sanitized HTML, post-process li elements client-side (strip the marker from li.firstChild, add todo/done classes) and draw the checkbox in CSS ::before rather than trusting the raw text. On macOS, sed -i 's|a|b|' file fails without an empty backup arg; use a python replace instead.