I have been using cypress-plugin-snapshots to do visual testing on our project. I have this scenario outline that changes in different parameters but are using the same screenshots. How do I make sure that the snapshots don't pile up? Or at least assign the snapshot as a baseline? I keep getting SNAPSHOT UPDATED instead of SNAPSHOT MATCH
Expected: 32 snapshots (baseline)
Here is the code below:
assertHeadingHeaderAndFooter(headingName){
var header = this.getSnapshotHeaderName(headingName)
var footer = this.getSnapshotFooterName(headingName)
this.getHeadingHeader(headingName).eq(0)
.scrollIntoView()
.toMatchImageSnapshot(header)
.should('exist')
this.getHeadingFooter(headingName).eq(0)
.scrollIntoView()
.toMatchImageSnapshot(footer)
.should('exist')
}
Sample image name:
K3 Headers and Footers C8761 C8762 C8763 C8764 C8765 C8766 C8770 C8771 C8772 C8773 C8774 C8775 Validate that K3 headers text can be updated and with correct pair of headers and footers using the combination of K3 tags. (example #1) #1
Scenario Outline:
Scenario Outline: C8761 C8762 C8763 C8764 C8765 C8766 C8770 C8771 C8772 C8773 C8774 C8775 Validate that K3 headers text can be updated and with correct pair of headers and footers using the combination of K3 tags.
Given a logged in user with a Administrator role with a "<type>" email
And the user creates a course, unit, and topic with "<grades>"
And the user navigates in the Create Page section
When the user clicks on the heading icon
Then the user be showed an alphabetical list of the headings and footers available
When the user selects a heading
Then there should be a corresponding footer for each header
And updating the text in the header should reflect on the preview
And updated texts must be in the correct order in the preview
Examples: Types and Grades
| type | grades |
| Test | Kinder |
| Test | G1 |
| Test | G2 |
| Test | G3 |
| Test | Kinder, G1, G2, G3 |
| Test | All Grade 12 and under |
| Non-AA | Kinder |
| Non-AA | G1 |
| Non-AA | G2 |
| Non-AA | G3 |
| Non-AA | Kinder, G1, G2, G3 |
| Non-AA | All Grade 12 and under |
