diff --git a/tests/testthat/_snaps/assaySpec.md b/tests/testthat/_snaps/assaySpec.md deleted file mode 100644 index d1dfc3af..00000000 --- a/tests/testthat/_snaps/assaySpec.md +++ /dev/null @@ -1,39 +0,0 @@ -# assaySpecInput creates expected HTML - - Code - assaySpecInput("my_assay", label_assays = "Please select the best assay") - Output -
- -
- - -
-
- - diff --git a/tests/testthat/_snaps/windows-4.3/barplot/barplot-001.png b/tests/testthat/_snaps/windows-4.3/barplot/barplot-001.png new file mode 100644 index 00000000..3b83f02b Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/barplot/barplot-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/boxplot/boxplot-001.png b/tests/testthat/_snaps/windows-4.3/boxplot/boxplot-001.png new file mode 100644 index 00000000..0055028c Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/boxplot/boxplot-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/forest/forest_tte-001.png b/tests/testthat/_snaps/windows-4.3/forest/forest_tte-001.png new file mode 100644 index 00000000..2cae7684 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/forest/forest_tte-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/km/km-001.png b/tests/testthat/_snaps/windows-4.3/km/km-001.png new file mode 100644 index 00000000..2680accd Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/km/km-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-001.png b/tests/testthat/_snaps/windows-4.3/pca/pca-001.png new file mode 100644 index 00000000..497f4361 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-002.png b/tests/testthat/_snaps/windows-4.3/pca/pca-002.png new file mode 100644 index 00000000..451e9394 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-002.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-003.png b/tests/testthat/_snaps/windows-4.3/pca/pca-003.png new file mode 100644 index 00000000..655e7a22 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-003.png differ diff --git a/tests/testthat/_snaps/windows-4.2/pca/pca-004.png b/tests/testthat/_snaps/windows-4.3/pca/pca-004.png similarity index 100% rename from tests/testthat/_snaps/windows-4.2/pca/pca-004.png rename to tests/testthat/_snaps/windows-4.3/pca/pca-004.png diff --git a/tests/testthat/_snaps/windows-4.2/pca/pca-005.png b/tests/testthat/_snaps/windows-4.3/pca/pca-005.png similarity index 100% rename from tests/testthat/_snaps/windows-4.2/pca/pca-005.png rename to tests/testthat/_snaps/windows-4.3/pca/pca-005.png diff --git a/tests/testthat/_snaps/windows-4.2/pca/pca-006.png b/tests/testthat/_snaps/windows-4.3/pca/pca-006.png similarity index 100% rename from tests/testthat/_snaps/windows-4.2/pca/pca-006.png rename to tests/testthat/_snaps/windows-4.3/pca/pca-006.png diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-007.png b/tests/testthat/_snaps/windows-4.3/pca/pca-007.png new file mode 100644 index 00000000..712f52e6 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-007.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-008.png b/tests/testthat/_snaps/windows-4.3/pca/pca-008.png new file mode 100644 index 00000000..305e69f2 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-008.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-009.png b/tests/testthat/_snaps/windows-4.3/pca/pca-009.png new file mode 100644 index 00000000..97343a06 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-009.png differ diff --git a/tests/testthat/_snaps/windows-4.3/pca/pca-010.png b/tests/testthat/_snaps/windows-4.3/pca/pca-010.png new file mode 100644 index 00000000..a2dc0af5 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/pca/pca-010.png differ diff --git a/tests/testthat/_snaps/windows-4.3/quality/quality-001.png b/tests/testthat/_snaps/windows-4.3/quality/quality-001.png new file mode 100644 index 00000000..829018bf Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/quality/quality-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/quality/quality-002.png b/tests/testthat/_snaps/windows-4.3/quality/quality-002.png new file mode 100644 index 00000000..3147550f Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/quality/quality-002.png differ diff --git a/tests/testthat/_snaps/windows-4.3/quality/quality-003.png b/tests/testthat/_snaps/windows-4.3/quality/quality-003.png new file mode 100644 index 00000000..85e078e3 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/quality/quality-003.png differ diff --git a/tests/testthat/_snaps/windows-4.3/scatterplot/scatterplot-001.png b/tests/testthat/_snaps/windows-4.3/scatterplot/scatterplot-001.png new file mode 100644 index 00000000..deaafdd2 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/scatterplot/scatterplot-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-001.png b/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-001.png new file mode 100644 index 00000000..e2866565 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-001.png differ diff --git a/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-002.png b/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-002.png new file mode 100644 index 00000000..d8479de6 Binary files /dev/null and b/tests/testthat/_snaps/windows-4.3/volcanoplot/volcanoplot-002.png differ diff --git a/tests/testthat/test-assaySpec.R b/tests/testthat/test-assaySpec.R index cbe8cf05..f92773c6 100644 --- a/tests/testthat/test-assaySpec.R +++ b/tests/testthat/test-assaySpec.R @@ -1,10 +1,20 @@ # assaySpecInput ---- test_that("assaySpecInput creates expected HTML", { - expect_snapshot(assaySpecInput( + expect_silent(result <- assaySpecInput( "my_assay", - label_assays = "Please select the best assay" + label_assays = "select assay" )) + + expect_class(result, "shiny.tag.list") + expect_length(result, 2) + + # First element is a div tag + expect_tag(result[[1]]) + + # Second element is the contents of a single js file + expect_length(result[[2]], 1) + expect_tag(result[[2]][[1]]) }) # nolint start diff --git a/tests/testthat/test-pca.R b/tests/testthat/test-pca.R index 4b470904..df2b3af2 100644 --- a/tests/testthat/test-pca.R +++ b/tests/testthat/test-pca.R @@ -60,13 +60,16 @@ test_that("pca module works as expected in the test app", { # Add a gene filter and deselect everything and check that it does not crash. app$set_inputs(!!ns2("add-MAE-hd1-row_to_add") := "symbol") app$wait_for_idle() + app$set_inputs(!!ns2("active-MAE-hd1-MAE_symbol_hd1_subset-inputs-selection_open") := TRUE, allow_no_input_binding_ = TRUE) app$set_inputs(!!ns2("active-MAE-hd1-MAE_symbol_hd1_subset-inputs-selection") := character()) + app$set_inputs(!!ns2("active-MAE-hd1-MAE_symbol_hd1_subset-inputs-selection_open") := FALSE, allow_no_input_binding_ = TRUE) + app$wait_for_idle() res <- app$get_value(output = ns("plot_pca-plot_main")) expect_match(res$message, "No genes or samples included in this experiment, please adjust filters") # Remove filters - app$click(ns2("add-MAE-hd1-MAE_symbol_hd1_subset-content-remove")) + app$click(ns2("active-MAE-hd1-MAE_symbol_hd1_subset-remove")) # Update the tab selection. app$set_inputs(!!ns("tab_selected") := "PC and Sample Correlation") @@ -175,12 +178,16 @@ test_that("pca module works as expected in the test app", { # Update to cor tab. app$set_inputs(!!ns("tab_selected") := "PCA") + app$set_inputs(!!ns2("active-MAE-subjects-MAE_SEX-inputs-selection_open") := TRUE, allow_no_input_binding_ = TRUE) app$set_inputs(!!ns2("active-MAE-subjects-MAE_SEX-inputs-selection") := "F") - res <- app$wait_for_value(output = ns("plot_pca")) + app$set_inputs(!!ns2("active-MAE-subjects-MAE_SEX-inputs-selection_open") := FALSE, allow_no_input_binding_ = TRUE) + + app$wait_for_idle() + res <- app$get_value(output = ns("plot_pca-plot_main")) expect_identical(res$message, "Sample size is too small. PCA needs more than 2 samples.") # Remove filter. - app$click(ns2("MAE_filter-subjects-_var_SEX-remove")) + app$click(ns2("active-MAE-subjects-MAE_SEX-remove")) # Initiate the use of Top Variance Genes filtering functionality. app$set_inputs(!!ns("filter_top") := TRUE) @@ -213,7 +220,7 @@ test_that("pca module works as expected in the test app", { app$set_inputs(!!ns("experiment-name") := "hd1") app$set_inputs(!!ns("filter_top") := "TRUE") res <- app$wait_for_value(input = ns("n_top")) - expect_identical(res, 1000L) + expect_identical(res, 2500L) }) # nolint end