Skip to content

Conversation

cmcculloh-kr
Copy link
Contributor

Allows user to provide custom name for their screenshots and snapshots:

			.screenshot({ path: settings.imageSnapshotPath + 'admin.0000.png'})
			.toMatchSnapshot({ name: 'admin.0000' })

Allows user to provide custom name for their screenshots and snapshots:
```
			.screenshot({ path: settings.imageSnapshotPath + 'admin.0000.png'})
			.toMatchSnapshot({ name: 'admin.0000' })
```
@@ -200,24 +200,36 @@ export default class Target {
}
}

async toMatchSnapshot(image, callback) {
async toMatchSnapshot(image, callback, settings) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could move all these sanitizations to a separate function like sanitiseToMatchSnapshotArg()?!

@NimaSoroush
Copy link
Owner

@CormacMcCarthy , Thanks for the PR. Can you add an example to API.md page and an integration test. It will help other people to understand the usecase better

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

Successfully merging this pull request may close these issues.

2 participants