library(acousticTS) test_that("pkgdown helper markup reflects validation metadata", { badge <- acousticTS:::.model_status_badge("benchmarked") expect_match(badge, "Benchmarked") expect_match(badge, "model-tag") partial_badge <- acousticTS:::.model_status_badge("partially_validated") expect_match(partial_badge, "Partially validated") header <- as.character( acousticTS:::.model_family_header( family = "hpa", pages = c( Theory = "theory.html", Implementation = "implementation.html", Overview = "index.html", Empty = "" ), current_page = "Theory" ) ) expect_match(header, "Validated") expect_true(grepl("href=\"index.html\"", header, fixed = TRUE)) expect_true(grepl("href=\"implementation.html\"", header, fixed = TRUE)) expect_false(grepl("href=\"theory.html\"", header, fixed = TRUE)) expect_false(grepl("Empty", header, fixed = TRUE)) expect_lt( regexpr("href=\"index.html\"", header, fixed = TRUE)[[1]], regexpr("href=\"implementation.html\"", header, fixed = TRUE)[[1]] ) overview <- as.character( acousticTS:::.model_family_overview( summary = "Summary text", family = "hpa", core_idea = "Core idea text", best_for = c("screening", "compact targets"), supports = "sphere", assumptions = "high ka", reading = c("Overview: index.html", "Theory: theory.html") ) ) expect_match(overview, "Summary text") expect_match(overview, "## Core idea") expect_match(overview, "## Validation status") expect_match(overview, "sphere") }) test_that("validation helper pages render expected sections", { policy <- as.character(acousticTS:::.validation_status_policy()) library_page <- as.character(acousticTS:::.validation_model_library()) expect_match(policy, "