Hi RStudio community,
Is there a method to set the theme context inside shiny::testServer
so the renderUI's do not return the sass_bundle()
related error? I have not seen anything in the shiny
/bslib
documentation on this and session$setCurrentTheme
inside the testServer does not seem to work as expected at first glance
Below the server module that would be tested using shiny::testServer
exampleServer <- function(id, settings) {
shiny::moduleServer(id, function(input, output, session) {
ns <- session$ns
# Create the interface
output$exampleTab <- shiny::renderUI({
tabContentUI(
id = ns("tabContent")
)
})
})
}
where tabContentUI
is a custom function that uses
# load css
bslib::bs_dependency_defer(
customDependency
)
The above works as expected in (for example) a fluidPage
context where a theme is set, but I am not sure there is a way to test the exampleTab
renderUI using shiny::testServer
if it depends on a bslib theme
context?
Appreciate any help