mirror of
https://github.com/datashard/snapshot.git
synced 2024-11-25 07:12:28 +00:00
start rewriting readme
This commit is contained in:
parent
af82f108ad
commit
7f629969d5
1 changed files with 10 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
# @cypress/snapshot
|
# @datashard/snapshot
|
||||||
|
|
||||||
> Adds value / object / DOM element snapshot testing support to Cypress test runner
|
> Adds value / object / DOM element snapshot testing support to Cypress test runner
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ After installing, add the following to your `cypress/support/commands.js` file
|
||||||
```js
|
```js
|
||||||
require("@cypress/snapshot").register();
|
require("@cypress/snapshot").register();
|
||||||
```
|
```
|
||||||
|
|
||||||
This registers a new command to create new snapshot or compare value to old snapshot
|
This registers a new command to create new snapshot or compare value to old snapshot
|
||||||
|
|
||||||
and add the following to your `cypress.config.js`
|
and add the following to your `cypress.config.js`
|
||||||
|
@ -43,7 +44,6 @@ and add the following to your `cypress.config.js`
|
||||||
|
|
||||||
**Note:** `@cypress/snapshot` **requires** the `readFileMaybe` plugin to be included, which can be easily done using the code above
|
**Note:** `@cypress/snapshot` **requires** the `readFileMaybe` plugin to be included, which can be easily done using the code above
|
||||||
|
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
Currently, if you want to take more than one snapshot, you need to pass a Step Name to prevent overwrites / test failures
|
Currently, if you want to take more than one snapshot, you need to pass a Step Name to prevent overwrites / test failures
|
||||||
|
@ -116,6 +116,7 @@ cy.get(...).snapshot("Intercepted API Request", {
|
||||||
This module provides some configuration options:
|
This module provides some configuration options:
|
||||||
|
|
||||||
#### snapshotPath
|
#### snapshotPath
|
||||||
|
|
||||||
Sets the default Path for saving Snapshots (default: `cypress/snapshots`)
|
Sets the default Path for saving Snapshots (default: `cypress/snapshots`)
|
||||||
|
|
||||||
## Debugging
|
## Debugging
|
||||||
|
@ -126,7 +127,7 @@ To debug this module run with environment variable `DEBUG=@cypress/snapshot`
|
||||||
|
|
||||||
### Small print
|
### Small print
|
||||||
|
|
||||||
Author: Gleb Bahmutov <gleb@cypress.io> & Joshua D. <[data@shard.wtf](mailto:data@shard.wtf)> © Cypress.io 2017-2022
|
Author: Gleb Bahmutov <gleb@cypress.io> & Joshua D. <[data@shard.wtf](mailto:data@shard.wtf)> © Cypress.io 2017-2022
|
||||||
<br>
|
<br>
|
||||||
License: MIT - do anything with the code, but don't blame us if it does not work.
|
License: MIT - do anything with the code, but don't blame us if it does not work.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue