diff --git a/inst/Description.qml b/inst/Description.qml index 9e1e085..7a0a867 100644 --- a/inst/Description.qml +++ b/inst/Description.qml @@ -12,6 +12,7 @@ Description website : "https://sophieberkhout.github.io/" license : "GPL (>= 2)" icon : "analysis-time-series.svg" + preloadData: true Analysis { diff --git a/tests/testthat/_snaps/ARIMATimeSeries/forecast-time-series-plot.svg b/tests/testthat/_snaps/ARIMATimeSeries/forecast-time-series-plot.svg index 518556e..a1352fe 100644 --- a/tests/testthat/_snaps/ARIMATimeSeries/forecast-time-series-plot.svg +++ b/tests/testthat/_snaps/ARIMATimeSeries/forecast-time-series-plot.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/ARIMATimeSeries/ljung-box-plot.svg b/tests/testthat/_snaps/ARIMATimeSeries/ljung-box-plot.svg index 89a0bb5..34103c9 100644 --- a/tests/testthat/_snaps/ARIMATimeSeries/ljung-box-plot.svg +++ b/tests/testthat/_snaps/ARIMATimeSeries/ljung-box-plot.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot1-subplot-1.svg b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot1-subplot-1.svg index 6b75523..4dd0ca2 100644 --- a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot1-subplot-1.svg +++ b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot1-subplot-1.svg @@ -331,11 +331,11 @@ -Jan -Apr -Jul -Oct -Jan +jan +apr +jul +okt +jan t Standardized Residuals time-series-plot1-subplot-1 diff --git a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot2-subplot-1.svg b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot2-subplot-1.svg index dac22b3..6d6e163 100644 --- a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot2-subplot-1.svg +++ b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot2-subplot-1.svg @@ -18,7 +18,7 @@ - + @@ -329,11 +329,11 @@ -Jan -Apr -Jul -Oct -Jan +jan +apr +jul +okt +jan t visits time-series-plot2-subplot-1 diff --git a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot3-subplot-1.svg b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot3-subplot-1.svg index 2942f12..8177f30 100644 --- a/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot3-subplot-1.svg +++ b/tests/testthat/_snaps/ARIMATimeSeries/time-series-plot3-subplot-1.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/DescriptivesTimeSeries/autocorrelation-function.svg b/tests/testthat/_snaps/DescriptivesTimeSeries/autocorrelation-function.svg index 06f1d18..6341120 100644 --- a/tests/testthat/_snaps/DescriptivesTimeSeries/autocorrelation-function.svg +++ b/tests/testthat/_snaps/DescriptivesTimeSeries/autocorrelation-function.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/DescriptivesTimeSeries/partial-autocorrelation-function.svg b/tests/testthat/_snaps/DescriptivesTimeSeries/partial-autocorrelation-function.svg index 35d6924..c67eb40 100644 --- a/tests/testthat/_snaps/DescriptivesTimeSeries/partial-autocorrelation-function.svg +++ b/tests/testthat/_snaps/DescriptivesTimeSeries/partial-autocorrelation-function.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/DescriptivesTimeSeries/time-series-plot-desc-subplot-1.svg b/tests/testthat/_snaps/DescriptivesTimeSeries/time-series-plot-desc-subplot-1.svg index 5b5b493..8a8e2eb 100644 --- a/tests/testthat/_snaps/DescriptivesTimeSeries/time-series-plot-desc-subplot-1.svg +++ b/tests/testthat/_snaps/DescriptivesTimeSeries/time-series-plot-desc-subplot-1.svg @@ -18,7 +18,7 @@ - + @@ -329,11 +329,11 @@ -Jan -Apr -Jul -Oct -Jan +jan +apr +jul +okt +jan t visits time-series-plot-desc-subplot-1 diff --git a/tests/testthat/_snaps/SpectralTimeSeries/power-spectral-density-plot.svg b/tests/testthat/_snaps/SpectralTimeSeries/power-spectral-density-plot.svg index 791e221..3d06dfd 100644 --- a/tests/testthat/_snaps/SpectralTimeSeries/power-spectral-density-plot.svg +++ b/tests/testthat/_snaps/SpectralTimeSeries/power-spectral-density-plot.svg @@ -18,7 +18,7 @@ - + diff --git a/tests/testthat/_snaps/StationarityTimeSeries/time-series-plot-stat-subplot-1.svg b/tests/testthat/_snaps/StationarityTimeSeries/time-series-plot-stat-subplot-1.svg index 19b032e..b2020d1 100644 --- a/tests/testthat/_snaps/StationarityTimeSeries/time-series-plot-stat-subplot-1.svg +++ b/tests/testthat/_snaps/StationarityTimeSeries/time-series-plot-stat-subplot-1.svg @@ -331,11 +331,11 @@ -Jan -Apr -Jul -Oct -Jan +jan +apr +jul +okt +jan t visits time-series-plot-stat-subplot-1 diff --git a/tests/testthat/helper-options.R b/tests/testthat/helper-options.R new file mode 100644 index 0000000..8d1c0c1 --- /dev/null +++ b/tests/testthat/helper-options.R @@ -0,0 +1,16 @@ + +analysisOptionsFromJaspDescriptives <- function(functionName) { + + filename <- switch( + functionName, + "DescriptivesTimeSeries" = "DescriptivesTimeSeriesForm.qml" + + ) + + path <- system.file("qml", "common", filename, package = "jaspDescriptives") + + if (!file.exists(path)) + stop("Could not find the QML file for \"", functionName, "\" at path:", path) + + return(jaspTools:::readQML(path)) +} diff --git a/tests/testthat/test-ARIMATimeSeries.R b/tests/testthat/test-ARIMATimeSeries.R index a0c4c34..3a66057 100644 --- a/tests/testthat/test-ARIMATimeSeries.R +++ b/tests/testthat/test-ARIMATimeSeries.R @@ -141,4 +141,4 @@ test_that("Time Series Plot matches", { plotName <- results[["results"]][["timeSeriesPlot"]][["data"]] testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] jaspTools::expect_equal_plots(testPlot, "time-series-plot3") -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-DescriptivesTimeSeries.R b/tests/testthat/test-DescriptivesTimeSeries.R index 57452dd..220654b 100644 --- a/tests/testthat/test-DescriptivesTimeSeries.R +++ b/tests/testthat/test-DescriptivesTimeSeries.R @@ -1,6 +1,7 @@ context("Descriptives Time Series") -options <- jaspTools::analysisOptions("DescriptivesTimeSeries") +# options <- jaspTools::analysisOptions("DescriptivesTimeSeries") +options <- analysisOptionsFromJaspDescriptives("DescriptivesTimeSeries") options$dependent <- "visits" options$time <- "date" options$lagPlot <- TRUE @@ -39,4 +40,4 @@ test_that("Time Series Plot matches", { plotName <- results[["results"]][["timeSeriesPlot"]][["data"]] testPlot <- results[["state"]][["figures"]][[plotName]][["obj"]] jaspTools::expect_equal_plots(testPlot, "time-series-plot-desc") -}) \ No newline at end of file +})