22
33This directory contains end-to-end (i.e. browser based) tests for Shiny for Python.
44
5- The Python files directly in this subdirectory are for Pytest fixtures and helper code
5+ The Python files directly in this subdirectory (and ` ./utils ` ) are for Pytest fixtures and helper code
66to make test writing easier. (Eventually this logic may move to the ` shiny ` package
77itself or its own dedicated package, so that Shiny app authors can set up their own e2e
88tests against their apps.)
@@ -17,14 +17,21 @@ optional, because the tests may also be for apps in the `../examples` or `../shi
1717The following commands can be run from the repo root:
1818
1919``` sh
20- # Run all e2e tests
20+ # Run tests related to shiny (in `./shiny` folder)
2121make playwright-shiny
22+ # Run tests related to examples (in `./examples` folder)
23+ make playwright-examples
24+ # Run tests on apps that should be deployed (in `./deploys` folder)
25+ make playwright-deploys
2226
2327# Run just the tests in playwright/shiny/async/
2428make playwright-shiny SUB_FILE=e2e/async
2529
2630# Run just the tests in playwright/shiny/async/, in headed mode
2731make playwright-shiny SUB_FILE=" --headed e2e/async"
32+
33+ # Run **all** tests on with pytest options best for debugging
34+ make playwright-debug
2835```
2936
3037## Shiny app fixtures
@@ -73,3 +80,5 @@ def test_airmass(page: Page, airmass_app: ShinyAppProc):
7380 plot = page.locator(" #plot" )
7481 expect(plot).to_have_class(re.compile(r " \b shiny-bound-output\b " ))
7582```
83+
84+ However, it is suggested to alter the example app for testing and use a local app for testing.
0 commit comments