-
Notifications
You must be signed in to change notification settings - Fork 114
tests(navs): Add PageNavbar and NavsetHidden tests and controllers
#1668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e77de89
Add page_navset and Navset_hidden tests and controllers
karangattu 7314f12
Add tests for checking gap params
karangattu b6f3acb
address failing tests
karangattu 30b846a
Merge branch 'main' into add-page_nav_bar-kitchensink
karangattu 21f43f5
use expect_to_have_class
karangattu 3fcc0e5
Add tests to check for page window title
karangattu 714f7e1
address linting failures
karangattu b9d3baa
Add additional test to check for window title
karangattu 80dcfe7
fix card tests
karangattu 23a5938
Merge branch 'main' into add-page_nav_bar-kitchensink
schloerke 8f56222
Change param name to `expect_inverse(value=)`; Add missing docs
schloerke 35d8357
Add TODO
schloerke fcb433d
Merge branch 'add-page_nav_bar-kitchensink' of https://github.com/pos…
schloerke 6efde5d
Remove default value of `expect_inverse(value=)`. This means it now r…
schloerke 464f0c2
Added changelog
karangattu fe6d3a2
move change log around
schloerke dd9e1d5
Added NavsetPillList `.expect_widths()` method
karangattu 109f9f1
Update test_page_navbar_fillable_app.py
karangattu 5629ee9
Update _navs.py
karangattu 69135d8
Update _navs.py
karangattu 1514f86
Merge branch 'main' into add-page_nav_bar-kitchensink
karangattu 1ec046f
Remove unused imports
karangattu f8dbcd4
linting issues
karangattu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
tests/playwright/shiny/components/nav/navset_hidden_kitchensink/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| from shiny import reactive | ||
| from shiny.express import input, ui | ||
|
|
||
| ui.input_radio_buttons("controller1", "Controller1", ["1", "2", "3"], selected="2") | ||
|
|
||
| with ui.navset_hidden( | ||
| id="hidden_tabs1", | ||
| header=ui.tags.div("Navset_hidden_header", id="navset_hidden_header1"), | ||
| footer=ui.tags.div("Navset_hidden_footer", id="navset_hidden_footer1"), | ||
| selected="panel2", | ||
| ): | ||
| with ui.nav_panel(None, value="panel1"): | ||
| "Panel 1 content" | ||
| with ui.nav_panel(None, value="panel2"): | ||
| "Panel 2 content" | ||
| with ui.nav_panel(None, value="panel3"): | ||
| "Panel 3 content" | ||
|
|
||
| ui.markdown("-----") | ||
| ui.input_radio_buttons("controller2", "Controller2", ["4", "5", "6"]) | ||
|
|
||
| with ui.navset_hidden(id="hidden_tabs2"): | ||
| with ui.nav_panel(None, value="panel4"): | ||
| "Panel 4 content" | ||
| with ui.nav_panel(None, value="panel5"): | ||
| "Panel 5 content" | ||
| with ui.nav_panel(None, value="panel6"): | ||
| "Panel 6 content" | ||
|
|
||
|
|
||
| @reactive.effect | ||
| @reactive.event(input.controller1) | ||
| def _(): | ||
| ui.update_navs("hidden_tabs1", selected="panel" + str(input.controller1())) | ||
|
|
||
|
|
||
| @reactive.effect | ||
| @reactive.event(input.controller2) | ||
| def _(): | ||
| ui.update_navs("hidden_tabs2", selected="panel" + str(input.controller2())) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.