diff --git a/packages/app/src/components/FileMatch.cy.tsx b/packages/app/src/components/FileMatch.cy.tsx
index 7f959ab30a8c..8ec23e763b05 100644
--- a/packages/app/src/components/FileMatch.cy.tsx
+++ b/packages/app/src/components/FileMatch.cy.tsx
@@ -50,11 +50,11 @@ describe('', { viewportWidth: 600, viewportHeight: 300 }, () => {
describe('expanding/collapsing', () => {
it('can be expanded and collapsed by the extension button', () => {
cy.get(extensionInputSelector).should('not.exist')
- cy.percySnapshot()
+ cy.percySnapshot('before expand')
cy.get(fileMatchButtonSelector).click()
.get(extensionInputSelector).should('be.visible')
- cy.percySnapshot()
+ cy.percySnapshot('after expand')
cy.get(fileMatchButtonSelector).click()
.get(extensionInputSelector).should('not.exist')
})
diff --git a/packages/app/src/runner/SnapshotToggle.cy.tsx b/packages/app/src/runner/SnapshotToggle.cy.tsx
index d0997833b638..4261345647bc 100644
--- a/packages/app/src/runner/SnapshotToggle.cy.tsx
+++ b/packages/app/src/runner/SnapshotToggle.cy.tsx
@@ -6,14 +6,14 @@ describe('', () => {
cy.mount(() => ())
- cy.percySnapshot()
+ cy.percySnapshot('before')
.get('body')
.findByText('2')
.click()
.parent()
.findByText('1')
.click()
- .percySnapshot()
+ .percySnapshot('after')
})
it('renders longer text', () => {
@@ -21,14 +21,14 @@ describe('', () => {
cy.mount(() => ())
- cy.percySnapshot()
+ cy.percySnapshot('before')
.get('body')
.findByText('Request')
.click()
.parent()
.findByText('Response')
.click()
- .percySnapshot()
+ .percySnapshot('after')
})
it('emits a select event with the active message', () => {
diff --git a/packages/app/src/settings/SettingsCard.cy.tsx b/packages/app/src/settings/SettingsCard.cy.tsx
index 304d619709ec..aa0135f79f22 100644
--- a/packages/app/src/settings/SettingsCard.cy.tsx
+++ b/packages/app/src/settings/SettingsCard.cy.tsx
@@ -23,11 +23,11 @@ describe('', () => {
cy.get(contentSelector).should('not.exist')
cy.findByText(title).click()
cy.get(contentSelector).should('be.visible')
- cy.percySnapshot()
+ cy.percySnapshot('expanded state')
cy.findByText(title).click()
.get(contentSelector).should('not.exist')
- cy.percySnapshot()
+ cy.percySnapshot('collapsed state')
// expected aria and keyboard behavior with space and enter keys:
cy.get(collapsibleSelector).should('be.focused')
diff --git a/packages/app/src/specs/SpecsList.cy.tsx b/packages/app/src/specs/SpecsList.cy.tsx
index c9c13b693a71..12975052d647 100644
--- a/packages/app/src/specs/SpecsList.cy.tsx
+++ b/packages/app/src/specs/SpecsList.cy.tsx
@@ -28,9 +28,7 @@ describe('', { keystrokeDelay: 0 }, () => {
cy.mountFragment(Specs_SpecsListFragmentDoc, {
onResult: (ctx) => {
- if (!specs.length) {
- specs = ctx.currentProject?.specs || []
- }
+ specs = ctx.currentProject?.specs || []
return ctx
},