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

Match cy.screenshot() filename behaviour #19

Closed
cb109 opened this issue Jul 23, 2018 · 3 comments
Closed

Match cy.screenshot() filename behaviour #19

cb109 opened this issue Jul 23, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@cb109
Copy link

cb109 commented Jul 23, 2018

https://docs.cypress.io/api/commands/screenshot.html#Naming-conventions

Newest cypress versions (3.0.2+) allow defining a nested screenshot filename like cy.screenshot('dir1/dir2/foobar) which automatically creates the dir1 directory and its dir2 subdirectory, storing foobar.png inside it. This pretty convenient e.g. when doing screenshots for mobile/dashboard and desktop/dashboard.

This plugin has its own naming scheme (test.title + name in kebab-case) and does not support this syntax for nested folders, it would be nice to match the default cypress behaviour :)

@jackjocross
Copy link
Collaborator

Nice, that is really convenient! We should definitely support that behavior.

It looks like we will have to make slight change in how we determine the snapshot name, I'm hoping to open a PR later today.

@jackjocross jackjocross added the enhancement New feature or request label Jul 25, 2018
@jackjocross jackjocross self-assigned this Jul 25, 2018
@jackjocross
Copy link
Collaborator

Released in v2.0.0.

Also with the major version bump we use Cypress' naming instead of our own custom kebab case.

@cb109
Copy link
Author

cb109 commented Aug 13, 2018

That was quick, I just upgraded and can confirm it works as desired, thank you 👍

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