Skip to content
Merged
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### New features

* Expose shiny.pytest, shiny.run and shiny.playwright modules that allow users to testing their Shiny apps. (#1448, #1456)

* Added busy indicators to provide users with a visual cue when the server is busy calculating outputs or otherwise serving requests to the client. More specifically, a spinner is shown on each calculating/recalculating output, and a pulsing banner is shown at the top of the page when the app is otherwise busy. Use the new `ui.busy_indicator.options()` function to customize the appearance of the busy indicators and `ui.busy_indicator.use()` to disable/enable them. (#918)

* Added support for creating modules using Shiny Express syntax, and using modules in Shiny Express apps. (#1220)
Expand Down
20 changes: 16 additions & 4 deletions shiny/playwright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@
"The shiny.playwright module requires the playwright package to be installed."
" Please install it with this command:"
"\n\n pip install playwright"
"\n\n",
"If you are using pytest to test your code,"
" you can install the pytest-playwright shim package with this command:",
"\n\n pip install pytest-playwright",
)
# If `pytest` is installed...
try:
import pytest # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingTypeStubs]

# At this point, `playwright` and `pytest` are installed.
# Try to make sure `pytest-playwright` is installed
try:
import pytest_playwright # noqa: F401 # pyright: ignore[reportUnusedImport, reportMissingTypeStubs]

except ImportError:
raise ImportError(
"If you are using pytest to test your app,"
" you can install the pytest-playwright shim package with this command:",
"\n\n pip install pytest-playwright",
)
except ImportError:
pass
from . import controls, expect

__all__ = ["expect", "controls"]
Loading