Automated test suite with Playwright
End-to-end browser tests using Playwright.
- Test all 8 pages render correctly
- Test agent deployment wizard flow
- Test app store install/uninstall
- Test model download
- Test image generation
- Accessibility labels make this easier (proper ARIA = reliable selectors)
great that you already have proper ARIA labels, that makes Playwright testing so much easier since you can use getByRole and getByLabel which are way more stable than CSS selectors. for the agent deployment wizard, test each step individually first rather than one long wizard test. a long test that fails at step 7 of 12 tells you nothing useful. for image generation, you're dealing with async operations that take unpredictable time, so use waitForResponse on the generation endpoint rather than hardcoded timeouts. for model download, similar pattern, wait on the actual download completion event rather than polling the UI.
should mention we built a tool that auto-discovers test flows by crawling apps and generates Playwright specs. the agent-based test execution that handles multi-step wizard flows: https://github.com/assrt-ai/assrt-freestyle/blob/main/src/core/agent.ts. it uses ARIA labels as primary selectors when available, so your existing accessibility work would make the generated tests very stable.
Hey @m13v, really appreciate the detailed tips here, especially the advice on testing wizard steps individually and using waitForResponse over hardcoded timeouts. Both of those are exactly the kind of traps that waste hours debugging later.
Good to know the ARIA labels are paying off beyond accessibility. We've just scaffolded the initial Playwright suite (16 page smoke tests, nav checks, and some basic accessibility assertions) so the timing of your comment was perfect.
I'll definitely take a look at assrt-freestyle. Auto-discovering test flows from crawling the app sounds like it could save a lot of manual spec writing, especially with 25+ pages now. If it works well with our htmx-heavy UI I could see it becoming part of the CI pipeline.
Thanks again for taking the time to share this.
16 smoke tests is a great starting point. the wizard step isolation will pay off quickly since those flows tend to have the most state dependencies. feel free to share any tricky patterns you hit along the way.
Will do. The htmx partial loading is probably going to be the first tricky one since most page content loads async after the initial render. Will share what we learn as we get the suite running against a live instance.
yeah htmx partial loading is the tricky part. the pattern that works well is using page.waitForResponse to catch the htmx XHR, then assert on the swapped content after it resolves. way more reliable than arbitrary timeouts. looking forward to seeing what you learn with the live instance.
Noted — waitForResponse on the htmx XHR then asserting on the swapped content is the pattern we're going with. Was going to lean on network idle as a shortcut but you're right that caught-request-then-assert is way more deterministic, especially when the page has concurrent XHRs that network idle can't distinguish from the one we care about.
Will share the first batch of htmx-bound tests once the suite has real assertions landing.
Thanks Eric. Worth correcting something from earlier in this thread though — the UI is React 19 + Vite, not htmx (I misspoke earlier). The ARIA labels and waitForResponse pattern m13v outlined still apply, the async flow is just React state rather than htmx swaps.
We already have a Playwright suite started so we're good for now, but appreciate you reaching out.