Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Set screenshot threshold and kernel_size for all tests #284

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Check if ~/.Rprofile exists and source it
if (file.exists(normalizePath("~/.Rprofile"))) {
source(normalizePath("~/.Rprofile"))
}

# Allow for a 10% difference in the screenshot kernel
# (3x RGB channels * kernel_size^2) * 10% = threshold
options(
shinytest2.compare_screenshot.kernel_size = 50,
shinytest2.compare_screenshot.threshold = 50^2 * 3 * 0.1
)
1 change: 0 additions & 1 deletion inst/apps/001-hello/app.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
### Keep this line to manually test this shiny application. Do not edit this line; shinycoreci::::is_manual_app


library(shiny)

# Define UI for app that draws a histogram ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 400be5eab4631c439e317d1207e428a3]",
"src": "[image data hash: b66fbda418b86c7c3328c1fdc0b836e0]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2c3fe1858e6d11a0f26a0bc81feb4b24]",
"src": "[image data hash: 90a76deba401c43714444b84f01a4b9e]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 73fd8715800f97582828b799397f4f8c]",
"src": "[image data hash: bb2f54e85389992fc7ad8a2931e79157]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 400be5eab4631c439e317d1207e428a3]",
"src": "[image data hash: b66fbda418b86c7c3328c1fdc0b836e0]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2c3fe1858e6d11a0f26a0bc81feb4b24]",
"src": "[image data hash: 90a76deba401c43714444b84f01a4b9e]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 73fd8715800f97582828b799397f4f8c]",
"src": "[image data hash: bb2f54e85389992fc7ad8a2931e79157]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 400be5eab4631c439e317d1207e428a3]",
"src": "[image data hash: b66fbda418b86c7c3328c1fdc0b836e0]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2c3fe1858e6d11a0f26a0bc81feb4b24]",
"src": "[image data hash: 90a76deba401c43714444b84f01a4b9e]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 73fd8715800f97582828b799397f4f8c]",
"src": "[image data hash: bb2f54e85389992fc7ad8a2931e79157]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 400be5eab4631c439e317d1207e428a3]",
"src": "[image data hash: b66fbda418b86c7c3328c1fdc0b836e0]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2c3fe1858e6d11a0f26a0bc81feb4b24]",
"src": "[image data hash: 90a76deba401c43714444b84f01a4b9e]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 73fd8715800f97582828b799397f4f8c]",
"src": "[image data hash: bb2f54e85389992fc7ad8a2931e79157]",
"width": 489.9844,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 97d1f60e768e985cf55598c69bf8b07b]",
"src": "[image data hash: e025dabe47ba4bd26c4e1313f27c558a]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.0/mytest/002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 83a96a15121ded8961c4f8da0d634f83]",
"src": "[image data hash: 377843151bd893aad50e59ca649d912e]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.0/mytest/004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: da4c5c68f65fdc928b1ba31d7d8f5f1d]",
"src": "[image data hash: 708853ad4599481f6d2d23a98ee29023]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.0/mytest/006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 97d1f60e768e985cf55598c69bf8b07b]",
"src": "[image data hash: e025dabe47ba4bd26c4e1313f27c558a]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 83a96a15121ded8961c4f8da0d634f83]",
"src": "[image data hash: 377843151bd893aad50e59ca649d912e]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.2/mytest/004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: da4c5c68f65fdc928b1ba31d7d8f5f1d]",
"src": "[image data hash: 708853ad4599481f6d2d23a98ee29023]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.2/mytest/006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 97d1f60e768e985cf55598c69bf8b07b]",
"src": "[image data hash: e025dabe47ba4bd26c4e1313f27c558a]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 83a96a15121ded8961c4f8da0d634f83]",
"src": "[image data hash: 377843151bd893aad50e59ca649d912e]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.4/mytest/004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: da4c5c68f65fdc928b1ba31d7d8f5f1d]",
"src": "[image data hash: 708853ad4599481f6d2d23a98ee29023]",
"width": 770,
"height": 400,
"alt": "Plot object",
Expand Down
Binary file modified inst/apps/001-hello/tests/testthat/_snaps/mac-4.4/mytest/006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 5648c964d1dd662b808df6a1c9799aeb]",
"src": "[image data hash: 9c99f44b297849aa749dcc59f568150e]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 28.08
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2446fa6262c8ca3477c0d68e36ed5da3]",
"src": "[image data hash: 143a223981e157775bb6b27ad6c86b48]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 72.8
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 3965dc29930c0ff43d02d5b372c29bb3]",
"src": "[image data hash: 900baf0f9ea816f12ee8fd43673ed309]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 38.48
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 5648c964d1dd662b808df6a1c9799aeb]",
"src": "[image data hash: 9c99f44b297849aa749dcc59f568150e]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 28.08
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 2446fa6262c8ca3477c0d68e36ed5da3]",
"src": "[image data hash: 143a223981e157775bb6b27ad6c86b48]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 72.8
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: 3965dc29930c0ff43d02d5b372c29bb3]",
"src": "[image data hash: 900baf0f9ea816f12ee8fd43673ed309]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand All @@ -18,8 +18,8 @@
"top": 38.48
},
"range": {
"left": 59.0077,
"right": 598.4328,
"left": 59.1017,
"right": 598.3846,
"bottom": 325.56,
"top": 58.04
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: e720431292a811f9f0c6ce0368ec1177]",
"src": "[image data hash: 9c99f44b297849aa749dcc59f568150e]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: b35459d0f2642102234df6c1f60ecc26]",
"src": "[image data hash: 143a223981e157775bb6b27ad6c86b48]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: cf7712b606a83f687f3d369c3a51aa35]",
"src": "[image data hash: 900baf0f9ea816f12ee8fd43673ed309]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: e720431292a811f9f0c6ce0368ec1177]",
"src": "[image data hash: 9c99f44b297849aa749dcc59f568150e]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: b35459d0f2642102234df6c1f60ecc26]",
"src": "[image data hash: 143a223981e157775bb6b27ad6c86b48]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"output": {
"distPlot": {
"src": "[image data hash: cf7712b606a83f687f3d369c3a51aa35]",
"src": "[image data hash: 900baf0f9ea816f12ee8fd43673ed309]",
"width": 628.6562,
"height": 400,
"alt": "Plot object",
Expand Down
2 changes: 2 additions & 0 deletions inst/apps/005-sliders/app.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
library(shiny)


# Define UI for slider demo app ----
ui <- fluidPage(

Expand Down Expand Up @@ -84,3 +85,4 @@ server <- function(input, output, session) {

# Create Shiny app ----
shinyApp(ui, server)

Loading
Loading