You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default to screenshot-ing the viewport (and/or make it easier?) #293
I'm not sure if this should be done in shinytest2 or chromote, but the fact that expect_values() calls expect_screenshot() (by default) which calls ChromoteSession$screenshot(), which defaults to selector = "html", which can pretty easily error out with
makes me think that {shinytest2} should default to screenshoting the viewport. Not only does it seem safer, but also probably more intuitive to the average user. Here's some code I wrote recently for this:
Another random thought....if changing the default is going to be too painful, maybe we could keep it, but fallback to the viewport on error (and emit a warning)?
Activity
cpsievert commentedon Dec 12, 2022
Another random thought....if changing the default is going to be too painful, maybe we could keep it, but fallback to the viewport on error (and emit a warning)?
cpsievert commentedon Feb 6, 2023
Here's a minimal reprex (run
shinytest2::record_test()on this and take a screenshot...you should get an error similar to the one above