test_that("layout_condensed uses aside as header and includes brand and theme items properly", { brand_tag <- shiny::tags$img(src = "logo.png") brand_div <- shiny::tags$div(class = "navbar-brand", brand_tag) theme_a <- shiny::tags$a(href = "#", class = "theme-toggle", "T") theme_li <- shiny::tags$li(class = "mt-auto", theme_a) li_item <- shiny::tags$li(shiny::tags$a(href = "#", "One")) ul <- shiny::tags$ul(li_item, theme_li) aside_tag <- shiny::tags$aside( class = "navbar navbar-vertical", shiny::tags$div(class = "container-fluid", brand_div, shiny::tags$div(class = "collapse navbar-collapse", id = "sidebar-menu", ul)) ) out <- layout_condensed(aside_tag, NULL, tabler_body("B"), NULL, show_theme_button = TRUE) s <- as.character(out) expect_true(grepl('navbar-brand', s)) expect_true(grepl('theme-toggle', s)) # Collapsible menu should include the nav item expect_true(grepl('One', s)) })