Skip to content
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

tests: Add 317-nav-insert #279

Merged
merged 4 commits into from
Jan 27, 2025
Merged

tests: Add 317-nav-insert #279

merged 4 commits into from
Jan 27, 2025

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Jan 27, 2025

Tests rstudio/shiny#4179 and the additional cases the shiny-insert-tab message handler should cover in particular (from rstudio/shiny#1794 (comment)):

We need these test cases for anywhere we insert dynamic UI:

  1. <script> blocks should run
  2. <script> blocks should only run once
  3. head()/singleton() should be respected
  4. HTML widgets should work
    a. Even when the dependencies are not part of the initial page load
  5. Shiny inputs/outputs should work
  6. Subapps should work (include a shinyApp object right in the UI)

I also included a test that involves a custom element that modifies its attributes in its connected callback. For this kind of custom element, shiny-insert-tab would render the HTML twice, causing the final inserted UI not to match what the user expected. This was fixed by the linked shiny PR.

@gadenbuie gadenbuie marked this pull request as ready for review January 27, 2025 22:15
@gadenbuie gadenbuie merged commit 0110900 into main Jan 27, 2025
1 check passed
@gadenbuie gadenbuie deleted the 317-nav-insert branch January 27, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant