Skip to content

tests: Add 317-bslib-dashboard#244

Open
gadenbuie wants to merge 14 commits into
mainfrom
317-bslib-dashboard
Open

tests: Add 317-bslib-dashboard#244
gadenbuie wants to merge 14 commits into
mainfrom
317-bslib-dashboard

Conversation

@gadenbuie

@gadenbuie gadenbuie commented Nov 13, 2023

Copy link
Copy Markdown
Member

Adds a new test suite for the shiny preset dashboard styles.

This test takes many screenshot but only on MacOS with R-release. I named the screenshot files as helpfully as possible and modified the platform variant to use mac-release, so that the screenshots are fluid across R versions.

@gadenbuie gadenbuie self-assigned this Nov 13, 2023
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R Outdated
Comment thread inst/apps/317-bslib-preset-shiny-dashboard/app.R
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
Comment on lines +56 to +59
p <- chrm$Page$navigate(url, wait_ = FALSE)$
then(function(...) chrm$Page$loadEventFired(wait_ = FALSE))$
then(function(...) chrm$Runtime$evaluate(shinytest2_js, wait_ = FALSE))$
then(function(...) app$wait_for_idle())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to set up the load event as a promise, chaining off that action, rather than chaining from the navigate call. See rstudio/chromote#102

Suggested change
p <- chrm$Page$navigate(url, wait_ = FALSE)$
then(function(...) chrm$Page$loadEventFired(wait_ = FALSE))$
then(function(...) chrm$Runtime$evaluate(shinytest2_js, wait_ = FALSE))$
then(function(...) app$wait_for_idle())
p <- chrm$Page$loadEventFired(wait_ = FALSE)$
then(function(...) chrm$Runtime$evaluate(shinytest2_js, wait_ = FALSE))$
then(function(...) app$wait_for_idle())
chrm$Page$navigate(url, wait_ = FALSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants