Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FRSOURCE/cypress-plugin-visual-regression-diff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.9
Choose a base ref
...
head repository: FRSOURCE/cypress-plugin-visual-regression-diff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.10
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Mar 26, 2023

  1. fix: add missing forceDeviceScaleFactor option

    Signed-off-by: Jakub Freisler <[email protected]>
    FRSgit committed Mar 26, 2023
    Copy the full SHA
    ba7d2f1 View commit details
  2. chore(release): 3.2.10 [skip ci]

    ## [3.2.10](v3.2.9...v3.2.10) (2023-03-26)
    
    ### Bug Fixes
    
    * add missing forceDeviceScaleFactor option ([ba7d2f1](ba7d2f1))
    semantic-release-bot committed Mar 26, 2023
    Copy the full SHA
    d48fa3e View commit details
Showing with 13 additions and 2 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +5 −1 src/commands.ts
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.2.10](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/compare/v3.2.9...v3.2.10) (2023-03-26)


### Bug Fixes

* add missing forceDeviceScaleFactor option ([ba7d2f1](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/commit/ba7d2f15b57390bb1ef69de6f7ed979438155444))

## [3.2.9](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/compare/v3.2.8...v3.2.9) (2023-03-26)

## [3.2.8](https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff/compare/v3.2.7...v3.2.8) (2022-12-18)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@frsource/cypress-plugin-visual-regression-diff",
"description": "Perform visual regression test with a nice GUI as help. 💅 Only for Cypress!",
"version": "3.2.9",
"version": "3.2.10",
"author": "Jakub Freisler <jakub.freisler@frsource.org>",
"homepage": "https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff",
"repository": "https://github.com/FRSOURCE/cypress-plugin-visual-regression-diff.git",
6 changes: 5 additions & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ declare global {
imagesDir?: string;
imagesPath?: string;
maxDiffThreshold?: number;
forceDeviceScaleFactor?: boolean;
title?: string;
matchAgainstPath?: string;
// IDEA: to be implemented if support for files NOT from filesystem needed
@@ -77,6 +78,7 @@ export const getConfig = (options: Cypress.MatchImageOptions) => {

return {
scaleFactor:
options.forceDeviceScaleFactor === false ||
Cypress.env("pluginVisualRegressionForceDeviceScaleFactor") === false
? 1
: 1 / window.devicePixelRatio,
@@ -131,7 +133,9 @@ Cypress.Commands.add(
} = getConfig(options);

const currentRetryNumber = (
cy as unknown as { state: (s: string) => { currentRetry: () => number } }
cy as unknown as {
state: (s: string) => { currentRetry: () => number };
}
)
.state("test")
.currentRetry();