Comments (2)
Perfect, thank you very much. Now it works. 🎉
from nicegui.
You need to call the page decorator in the test. What we often do is something like this:
def setup():
@ui.page("/test")
def ui_page(param: Optional[str] = "test"):
ui.markdown(param)
def test_ui_page(screen: Screen):
setup()
screen.open("/test")
screen.should_contain("test")
if __name__ in {"__main__", "__mp_main__"}:
setup()
from nicegui.
Related Issues (20)
- Unpredictable Behavior of `ui.textarea` with Over a Million Characters HOT 4
- The pages of the website can only be accessed by one person, and the other person is currently under the control of another person after accessing it HOT 11
- niceGUI + Echart Pie charts or bar charts cannot be categorized by clicking Category HOT 3
- Can't reference model object like Quasar did. HOT 2
- Clear method on data table does not work HOT 3
- Missing testing/plugin.py file? HOT 6
- AttributeError: module 'secrets' has no attribute 'token_bytes' HOT 1
- Passing PUID/PGID to nicegui docker results in "chown: invalid group: ‘appuser:appgroup’" errors in docker log
- Updating AxesImage objects (.imshow(), .pcolormesh()) of matplotlib. HOT 1
- JavaScript error when using `ui.notify` HOT 3
- How can I display a log box on all pages, and if there is a message push, it can be displayed HOT 1
- Display issues when combining ui.dropdown_button and ui.badge HOT 3
- How to solve the problem of ui.table search
- self.scene.remove(line) fails with 'Line' object has no attribute 'descendants' HOT 1
- TailwindCSS响应式布局的异常 | TailwindCSS responsive layout exceptions HOT 5
- table from_pandas frozen when column is list HOT 2
- Test user fails when using ElementFilter to look for select elements HOT 3
- Using testing.User should not require Selenium
- chrome browser ERR: RESULT_CODE_HUNG HOT 17
- Double-sided material property not applied to objects loaded from gltf HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nicegui.