File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ declare global {
1616 imagesDir ?: string ;
1717 imagesPath ?: string ;
1818 maxDiffThreshold ?: number ;
19+ forceDeviceScaleFactor ?: boolean ;
1920 title ?: string ;
2021 matchAgainstPath ?: string ;
2122 // IDEA: to be implemented if support for files NOT from filesystem needed
@@ -77,6 +78,7 @@ export const getConfig = (options: Cypress.MatchImageOptions) => {
7778
7879 return {
7980 scaleFactor :
81+ options . forceDeviceScaleFactor === false ||
8082 Cypress . env ( "pluginVisualRegressionForceDeviceScaleFactor" ) === false
8183 ? 1
8284 : 1 / window . devicePixelRatio ,
@@ -131,7 +133,9 @@ Cypress.Commands.add(
131133 } = getConfig ( options ) ;
132134
133135 const currentRetryNumber = (
134- cy as unknown as { state : ( s : string ) => { currentRetry : ( ) => number } }
136+ cy as unknown as {
137+ state : ( s : string ) => { currentRetry : ( ) => number } ;
138+ }
135139 )
136140 . state ( "test" )
137141 . currentRetry ( ) ;
You can’t perform that action at this time.
0 commit comments