test_that("layout_navbar_overlap sets data-bs-theme dark and adds text-white to page-header", { brand_div <- shiny::tags$div(class = "navbar-brand", "Brand") li_item <- shiny::tags$li(shiny::tags$a(href = "#", "OverlapItem")) ul <- shiny::tags$ul(li_item) 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)) ) # Body with a page-header div that should receive text-white page_header <- shiny::tags$div(class = "page-header", "Head") body <- list(page_header, shiny::tags$div(class = "page-body", "Content")) out <- layout_navbar_overlap(aside_tag, NULL, body, NULL, show_theme_button = FALSE) s <- as.character(out) expect_true(grepl('data-bs-theme="dark"', s)) expect_true(grepl('text-white', s)) expect_true(grepl('OverlapItem', s)) })