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

Reference screenshots not browser that is not in configuration (cache) #148

Open
varya opened this issue May 19, 2021 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@varya
Copy link
Contributor

varya commented May 19, 2021

My config is like the following

module.exports = {
  screenDir: path.join(__dirname, '../tests/visual/references/'),
  reportDir: path.join(__dirname, '../tests/visual/report'),
  diffOptions: { threshold: 0.1 },
  browsers: {
    "chrome.desktop": {
      browserName: 'chrome',
      // Define initial viewport size
      viewport: { width: 1366, height: 1000 },
    },
    "chrome.tablet": {
      browserName: 'chrome',
      // Define initial viewport size
      viewport: { width: 640, height: 1000 },
    },
    "chrome.mobile": {
      browserName: 'chrome',
      // Define initial viewport size
      viewport: { width: 480, height: 768 },
    },
  },
};

But when I do creevey --update, I get unnecessary references for not anymore existing "chrome" browser. Looks like some cache issue. It is possible to clean the cache automatically?

2021-05-19_15-09-03

@wKich
Copy link
Collaborator

wKich commented May 20, 2021

Yeah, I can improve it a little. But there is a scenario when you have a test with multiple screenshot assertions, where each screenshot has its own name. On a startup, I can grab information about stories/browsers and test names, but can't get actual image names from tests without executing them. So if you will have such tests and rename images in the test, the --update doesn't know about it.

@wKich wKich added the enhancement New feature or request label May 20, 2021
@wKich
Copy link
Collaborator

wKich commented May 20, 2021

I think that scenario is rare and it's ok to make the common case better leave the rare case as is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants