Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Mar 15, 2024
1 parent 4c131f4 commit 26842c7
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 25 deletions.
14 changes: 7 additions & 7 deletions tests/testthat/_snaps/build-home-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# data_home_sidebar() errors well when no HTML file

Can't locate 'file.html'.
x home.sidebar.html in '_pkgdown.yml' is misconfigured.
x home.sidebar.html in _pkgdown.yml is misconfigured.

# data_home_sidebar() can get a custom markdown formatted component

Expand All @@ -75,16 +75,16 @@
data_home_sidebar(pkg)
Condition
Error in `data_home_sidebar()`:
! Can't find component home.sidebar.components.fancy in '_pkgdown.yml'.
! Can't find component home.sidebar.components.fancy in _pkgdown.yml.

---

Code
data_home_sidebar(pkg)
Condition
Error in `data_home_sidebar()`:
! Can't find components home.sidebar.components.fancy in '_pkgdown.yml'.
Can't find components home.sidebar.components.cool in '_pkgdown.yml'.
! Can't find components home.sidebar.components.fancy in _pkgdown.yml.
Can't find components home.sidebar.components.cool in _pkgdown.yml.

---

Expand All @@ -95,7 +95,7 @@
i In index: 1.
i With name: fancy.
Caused by error in `.f()`:
! Can't find component home.sidebar.components.fancy.title in '_pkgdown.yml'.
! Can't find component home.sidebar.components.fancy.title in _pkgdown.yml.

---

Expand All @@ -106,6 +106,6 @@
i In index: 1.
i With name: fancy.
Caused by error in `.f()`:
! Can't find components home.sidebar.components.fancy.title in '_pkgdown.yml'.
Can't find components home.sidebar.components.fancy.text in '_pkgdown.yml'.
! Can't find components home.sidebar.components.fancy.title in _pkgdown.yml.
Can't find components home.sidebar.components.fancy.text in _pkgdown.yml.

2 changes: 1 addition & 1 deletion tests/testthat/_snaps/build-redirects.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
Condition
Error:
! Entry 5 must be a character vector of length 2.
x Edit url in '_pkgdown.yml'.
x Edit url in _pkgdown.yml.

4 changes: 2 additions & 2 deletions tests/testthat/_snaps/build-reference-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
i In index: 1.
Caused by error in `.f()`:
! Item 2 in section 1 is empty.
x Delete the empty line or add function name to reference in '_pkgdown.yml'.
x Delete the empty line or add function name to reference in _pkgdown.yml.

# errors well when a content entry is not a character

Expand All @@ -71,7 +71,7 @@
i In index: 1.
Caused by error in `.f()`:
! Item 2 in section 1 must be a character.
x You might need to add '' around e.g. - 'N' or - 'off' to reference in '_pkgdown.yml'.
x You might need to add '' around e.g. - 'N' or - 'off' to reference in _pkgdown.yml.

# errors well when a content entry refers to a not installed package

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
Condition
Error:
! Boostrap version must be 3 or 5.
x You set a value of 1 to template.bootstrap in '_pkgdown.yml'.
x You set a value of 1 to template.bootstrap in _pkgdown.yml.

2 changes: 1 addition & 1 deletion tests/testthat/_snaps/render.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# check_bootswatch_theme() works

Can't find Bootswatch theme "paper" (template.bootswatch) for Bootstrap version "4" (template.bootstrap).
x Edit settings in '_pkgdown.yml'
x Edit settings in _pkgdown.yml

# capture data_template()

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/sitrep.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Condition
Warning:
pkgdown situation report: configuration error
x url in '_pkgdown.yml'is misconfigured. See `vignette(pkgdown::metatdata)`.
x url in _pkgdown.yml is misconfigured. See `vignette(pkgdown::metatdata)`.
x 'DESCRIPTION' URL is empty.

---
Expand Down
27 changes: 18 additions & 9 deletions tests/testthat/_snaps/topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be valid R code, not "x + ".
! Topic must be valid R code, not "x + ".
i Run `usethis::edit_pkgdown_config()` to edit.
Code
t <- select_topics("y", topics)
Condition
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a known topic name or alias, not "y".
! Topic must be a known topic name or alias, not "y".
i Run `usethis::edit_pkgdown_config()` to edit.
Code
t <- select_topics("paste(1)", topics)
Condition
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a known selector function, not "paste(1)".
! Topic must be a known selector function, not "paste(1)".
i Run `usethis::edit_pkgdown_config()` to edit.
Caused by error in `paste()`:
! could not find function "paste"
Code
Expand All @@ -29,19 +32,22 @@
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a known topic name or alias, not "starts_with".
! Topic must be a known topic name or alias, not "starts_with".
i Run `usethis::edit_pkgdown_config()` to edit.
Code
t <- select_topics("1", topics)
Condition
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a string or function call, not "1".
! Topic must be a string or function call, not "1".
i Run `usethis::edit_pkgdown_config()` to edit.
Code
t <- select_topics("starts_with('y')", topics, check = TRUE)
Condition
Error:
! No topics matched in '_pkgdown.yml'. No topics selected.
! No topics matched in pkgdown config. No topics selected.
i Run `usethis::edit_pkgdown_config()` to edit.

# can select by name or alias

Expand All @@ -51,20 +57,23 @@
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a known topic name or alias, not "a4".
! Topic must be a known topic name or alias, not "a4".
i Run `usethis::edit_pkgdown_config()` to edit.
Code
select_topics("c::a", topics)
Condition
Error in `purrr::map()`:
i In index: 1.
Caused by error:
! In '_pkgdown.yml', topic must be a known topic name or alias, not "c::a".
! Topic must be a known topic name or alias, not "c::a".
i Run `usethis::edit_pkgdown_config()` to edit.

# an unmatched selection generates a warning

Code
select_topics(c("a", "starts_with('unmatched')"), topics, check = TRUE)
Condition
Error:
! In '_pkgdown.yml', topic must match a function or concept, not "starts_with('unmatched')".
! Topic must match a function or concept, not "starts_with('unmatched')".
i Run `usethis::edit_pkgdown_config()` to edit.

6 changes: 3 additions & 3 deletions tests/testthat/_snaps/utils-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
check_yaml_has("x", where = "a", pkg = pkg)
Condition
Error:
! Can't find component a.x in '_pkgdown.yml'.
! Can't find component a.x in _pkgdown.yml.
Code
check_yaml_has(c("x", "y"), where = "a", pkg = pkg)
Condition
Error:
! Can't find components a.x in '_pkgdown.yml'.
Can't find components a.y in '_pkgdown.yml'.
! Can't find components a.x in _pkgdown.yml.
Can't find components a.y in _pkgdown.yml.

0 comments on commit 26842c7

Please sign in to comment.