posit-dev / posit-dev/shinyreact
Add an R Playwright e2e suite
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 3
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 74
Description
Split out of #185, which closed the R unit-test gaps. This is the one item left: R has no end-to-end tests.
Why it is its own issue
The blocker is fixture infrastructure, not test cases. pkg-py/tests/playwright/ stands up a Python Shiny app per fixture; an R suite needs an equivalent runner for R apps (shiny::runApp() in a subprocess, port allocation, readiness polling, teardown) before a single assertion can be written. That is a different kind of change from writing tests, so it did not belong in #185's PR.
What to cover
The JS bundle is byte-identical between the two packages (md5 335334fd88165d6906de2fd20c2ee174), so an R suite is not re-testing the client — it validates the R server bindings. A subset of the Python suite is enough. Python currently covers:
- module namespaces
- module dependency injection
- bookmark restore
- input-handler types
ShinyOutput
Bookmark restore and input-handler types are the highest value in R, since those are where the two servers' implementations actually differ (pkg-r/R/bookmark.R uses pinned shiny::: internals; default_input_handler() exists specifically to undo jsonlite/shiny simplification that Python never does).
Module dependency injection is likely not applicable — set_react_page()'s renderer-dependency harvesting is Shiny Express-only and has no R analogue by an explicit decision.
Notes
decisions/2026-03-17-playwright-testing-architecture.mdrecords the recommended approach (code-gen from TypeScript) for browser testing generally; worth reading before picking a direction.- The Makefile pattern to mirror:
py-test-e2eclears theaddoptsthat otherwise ignore theplaywright/subtree, keepingpy-check-testsfast.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read decisions/2026-03-17-playwright-testing-architecture.md and compare pkg-py/tests/playwright/ with the Makefile's py-test-e2e pattern. Then inspect pkg-r/R/bookmark.R and the existing Python cases for bookmark restore and input-handler types. Done means an R app runner supports subprocess startup, port allocation, readiness polling, and teardown, with a focused R Playwright suite covering the highest-value server bindings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, r, typescript
- Domain
- backend, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100