Add compare_file_screenshot(); Add AppDriver$expect_screenshot(compare=)#231
Add compare_file_screenshot(); Add AppDriver$expect_screenshot(compare=)#231
compare_file_screenshot(); Add AppDriver$expect_screenshot(compare=)#231Conversation
…p11_all_the_things * origin/compare_file_screenshot: `devtools::document()` (GitHub Actions) Add `compare_file_screenshot()`
Co-Authored-By: Winston Chang <winston@stdout.org>
…omparison MUCH clearer
…_screenshot_threshold()`
|
Some widows have a very large diff in the value found in a test I wonder if reading a png is different in different operating systems. Or if finding the diff matrix is different on different OS values
|
|
Found a bug in which I was accessing matrix locations that were not initialized in cpp. 🤦♂️ |
| screenshot_args = missing_arg(), | ||
| delay = missing_arg(), | ||
| selector = missing_arg(), | ||
| compare = missing_arg(), |
There was a problem hiding this comment.
For future reference, here's another possibility for the API.
We could remove the threshold and kernel_size params from this function, and the default value for compare would be:
compare = testthat::compare_file_binaryAnd then if people want to use the fuzzy comparison, they would do something like:
compare = fuzzy_comparer(threshold = 3, kernel_size = 5)
# Or maybe those values could use those as defaults
compare = fuzzy_comparer()The benefit is that it's a more general API, and provides a cleaner interface for plugging in other comparison functions. However, it seems unlikely anyone would ever use this capability, and it requires people to know about the fuzzy_comparer function.
|
Merging and keeping unresolved convo open as it is a comment. |

Fixes rstudio/chromote#96
Fixes #220
(Creating PR now, will update docs before merge); Updated docs for methods