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

Need actual image as a seperate image #252

Open
nani554 opened this issue Feb 3, 2021 · 4 comments
Open

Need actual image as a seperate image #252

nani554 opened this issue Feb 3, 2021 · 4 comments

Comments

@nani554
Copy link

nani554 commented Feb 3, 2021

  1. I have a scenario where i have baseline and i have diff image which shows difference of baseline and actual image, now i need actual image as a seperate image, could you please point me to correct direction @anescobar1991
  2. I need "actual image" as a seperate image, so that i can validate those and replace "baseline images" with the "actual images"
  3. i would like to store that actual image in a seperate folder using "fs"
@github-actions
Copy link

github-actions bot commented Mar 8, 2021

This issue is stale because it has been open 30 days with no activity.

@espi-jisc
Copy link

I'm having the same issue. Did you manage to solve it?

@nani554
Copy link
Author

nani554 commented Mar 13, 2021

okay, what i have done is basically is hacky way which goes like this:
i'm creating new image(actual image) again aside seperately using cy.screenshot() command,

code:

expect(image).toMatchImageSnapshot(); // which basically compare old image with new image//current image
cy.screenshot(image); // creates a new image aside

so here two things are happening

  1. you are using this package command to compare and get diff image.
  2. you are again creating a new image using cy.screenshot() (cypress default screenshot command).

By doing above, two functionalities are being fullfilled:

  1. you can seee diff using "package command"
  2. you can have a new image using "cypress screenshot command"

@espi-jisc use this process if its helpfull.
again im using fs to batch commands to place new images in a desired folder and im identifying weather image is the new image or not, for this iam placing new image(while capturing) inside "new_baselines" folder

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants