Repository navigation
Change default screenshot selector to "scrollable_area" (from bounding box of "html" DOM) - #325
Merged
Merged
Conversation
Using comment from https://github.com/rstudio/shinytest2/issues/218#issuecomment-1146097081 that suggests to use "round" numbers for easier division. While this isn't a perfect fix, it provides a much better opportunity to succeed at first run. If trouble still arises from rounded corners, then the `threshold` arg can be used.
* `"scroll"` is the max scroll size. Which can be larger than the browser’s viewport. But takes a picture of the whole scrollable area * `"viewport"` is literally the browser viewport at it’s current scroll position
schloerke
marked this pull request as ready for review
February 9, 2023 20:54
cpsievert
reviewed
Feb 9, 2023
cpsievert
reviewed
Feb 9, 2023
cpsievert
reviewed
Feb 9, 2023
cpsievert
reviewed
Feb 9, 2023
cpsievert
reviewed
Feb 9, 2023
Co-authored-by: Carson Sievert <[email protected]>
* main: actions/test-app; Add multi app `app-dir` support; Default upload-snapshot to `true` (#322)
Collaborator
Author
|
Haven't see the windows failure before. Seems unrelated. Merging |
html DOM)"scrollable_area" (from bounding box of "html" DOM)
schloerke
added a commit
that referenced
this pull request
Feb 22, 2023
* main:
Update cran-comments.md
Update cran-comments.md
Run revdep
Move crashpad file to setup test file
Update cran-comments.md
Remove detritus Crashpad file/directory on CRAN
Don't use github `{lintr}` or `{decor}` package
Run revdep on 12 pkgs; ✅
Remove C++11 from DESCRIPTION (#326)
News entries for #284 and #288
Load global vars when saving app objects (#307)
Better error message when both app.R and server.R are found (#284)
Don't assume preview overflow is of length 1 (#291)
Force JS code to be a character for `{glue}` support (#288)
fix typo: expect_unqiue_names -> expect_unique... (#270)
Fix typo: use_shinytest -> use_shinytest2 (#269)
`compare_screenshot_threshold()` should not error from `screenshot_max_difference()` (#276)
Increment version number to 0.2.1
Change default screenshot selector to `"scrollable_area"` (from bounding box of `"html"` DOM) (#325)
actions/test-app; Add multi app `app-dir` support; Default upload-snapshot to `true` (#322)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #293
Two new query selector options can be added:
"scroll"(default), and"viewport".This is a (hopefully welcoming) breaking change for oddly sized apps / viewport combinations.
Independently, I walked down the path of changing the default screen size to 900px high by 1200px wide.
Reasoning...
Using comment from https://github.com/rstudio/shinytest2/issues/218#issuecomment-1146097081 that suggests to use "round" numbers for easier division. While this isn't a perfect fix, it provides a much better opportunity to succeed at first run. If trouble still arises from rounded corners, then the
thresholdarg can be used.However...
In rstudio/chromote#96, Chrome DevTool Protocol has a bug which was really causing the redrawing issues. Wouldn't matter what size the screen is if it's doing that.
Therefore...
Not changing the default screen size.