Skip to content

Commit fd0bbe4

Browse files
authored
viztest for #625 (#632)
* viztest for #625 * set name to aaa-test-viztest for tests. Add PR number comment * add keyword internal and remove from exec
1 parent c8b86dc commit fd0bbe4

File tree

4 files changed

+82
-2
lines changed

4 files changed

+82
-2
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ Brief description of the solution
4747

4848
PR task list:
4949
- [ ] Update NEWS
50-
- [ ] Add tests (if appropriate)
50+
- [ ] Add tests (where appropriate)
51+
- R code tests: `tests/testthat/`
52+
- Visual tests: `R/zzz_viztest.R`
5153
- [ ] Update documentation with `devtools::document()`

R/zzz_viztest.R

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#' Visual Testing scripts for vistest
2+
#'
3+
#' Visual testing examples to be used by the vistest package.
4+
#'
5+
#' @keywords internal
6+
#' @name aaa-test-viztest
7+
#' @rdname aaa-test-viztest
8+
#' @examples
9+
#'
10+
#'
11+
#'
12+
#' \donttest{
13+
#'
14+
#'
15+
#' ### Start addGeoJSON properties - https://github.com/rstudio/leaflet/pull/625
16+
#' polygon = list(
17+
#' type = "Polygon",
18+
#' coordinates = list(
19+
#' list(
20+
#' c(8.330469, 48.261570),
21+
#' c(8.339052, 48.261570),
22+
#' c(8.339052, 48.258227),
23+
#' c(8.330469, 48.258227),
24+
#' c(8.330469, 48.261570)
25+
#' )
26+
#' )
27+
#' )
28+
#'
29+
#' # should produce an orange-ish rectangle around `Ramsel`
30+
#' leaflet() %>%
31+
#' addTiles() %>%
32+
#' addGeoJSON(polygon, color="#F00") %>%
33+
#' setView(lng = 8.330469, lat = 48.26157, zoom = 15)
34+
#' ### End PR #625
35+
#'
36+
#'
37+
#' } # end donttest
38+
NULL

man/aaa-test-viztest.Rd

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/viztest.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
devtools::install_github("schloerke/viztest")
1+
remotes::install_github("schloerke/viztest")
22
# source("scripts/viztest.R")
33

44

0 commit comments

Comments
 (0)