diff --git a/tests/testthat/_snaps/g_lineplot/g-lineplot-cohorts.svg b/tests/testthat/_snaps/g_lineplot/g-lineplot-cohorts.svg new file mode 100644 index 0000000000..b3fd53ddc7 --- /dev/null +++ b/tests/testthat/_snaps/g_lineplot/g-lineplot-cohorts.svg @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +18 +19 +20 +21 +22 + + + + + + + + + + + +BASELINE +WEEK 1 DAY 8 +WEEK 2 DAY 15 +WEEK 3 DAY 22 +WEEK 4 DAY 29 +WEEK 5 DAY 36 +Lab Test ALT (U/L) + +Description of Planned Arm + + + + + + + + + + + + +A: Drug X (N = 69) +B: Placebo (N = 73) +C: Combination (N = 58) +Laboratory Test: ALT (U/L) +Plot of Mean and 80% Confidence Limits by Visit +caption + + + + + + + + + + + + + + + + + + +69 +19.2 +(18.48, 19.90) +69 +20.8 +(20.14, 21.42) +69 +19.6 +(18.90, 20.27) +69 +19.6 +(19.03, 20.23) +69 +20.3 +(19.67, 20.93) +69 +19.8 +(19.16, 20.42) + + + + + + + + + + +73 +20.3 +(19.66, 20.99) +73 +20.2 +(19.54, 20.77) +73 +20.7 +(19.97, 21.34) +73 +19.4 +(18.78, 20.02) +73 +20.4 +(19.71, 21.07) +73 +19.3 +(18.59, 19.93) + + + + + + + + + + +58 +19.2 +(18.49, 19.87) +58 +19.4 +(18.73, 19.99) +58 +20.0 +(19.43, 20.66) +58 +20.3 +(19.68, 20.95) +58 +21.0 +(20.17, 21.76) +58 +19.4 +(18.65, 20.07) + + + + + + + + + + +C: Combination + + + + + + + + + + +B: Placebo + + + + + + + + + + +A: Drug X + + +Mean 95% CI +Mean +n +Mean 95% CI +Mean +n +Mean 95% CI +Mean +n + + diff --git a/tests/testthat/test-g_lineplot.R b/tests/testthat/test-g_lineplot.R index 1d4fa2d885..f1a1339941 100644 --- a/tests/testthat/test-g_lineplot.R +++ b/tests/testthat/test-g_lineplot.R @@ -23,7 +23,7 @@ testthat::test_that("g_lineplot works with custom settings and statistics table" }) testthat::test_that("g_lineplot works with cohort_id specified", { - testthat::expect_silent(g_lineplot( + g_lineplot_cohorts <- g_lineplot( adlb, adsl, strata = control_lineplot_vars(strata = "ARM", cohort_id = "USUBJID"), @@ -34,5 +34,6 @@ testthat::test_that("g_lineplot works with cohort_id specified", { y_lab = "Lab Test", subtitle = "Laboratory Test:", caption = "caption" - )) + ) + vdiffr::expect_doppelganger(title = "g_lineplot_cohorts", fig = g_lineplot_cohorts) })