Skip to content

[Bug]: matchAgainstPath is not work #282

@huangmengjiao-hmj

Description

@huangmengjiao-hmj

Describe the Bug

When I use 'matchAgainstPath' to specify the image for comparison, it doesn't work

Steps to reproduce

1.This is a snapshot generated from one of my test cases.
image
2.This is the image generated after I configured the 'matchAgainstPath' path
image
3.This is the method I called, and these two images are in the same directory.
cy.matchImage(
{
screenshotConfig: {
blackout: [''],
},
diffConfig: {
threshold: 0.01,
},
createMissingImages: true,
updateImages: false,
maxDiffThreshold: 0.01,
forceDeviceScaleFactor: true,
matchAgainstPath: './test checkbox disabled checkbox is not disabled #0.png',
}
);
4.This is the test result returned when I executed this test statement. Clearly, it didn't compare with the snapshot I selected. I would like to know if there is a solution to this issue.
image

Expected behavior

I would like to see the comparison result between it and the previous image I selected

Additional context

No response

Package version

3.3.10

Device

pc a component testing

OS and version

Windows 11

Browser and version

chrome 115

Node version

16.17.0

I can work on it by myself

  • Yes
  • No

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions