From 6e6555f1117c71509c32520dc0fd837aae6b3b98 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Tue, 2 Jan 2024 15:14:56 -0700 Subject: [PATCH 1/2] fix: protocol supports body highlight element --- packages/driver/cypress/e2e/cy/snapshot.cy.js | 76 ++++++++++++++----- packages/driver/src/cy/snapshots.ts | 4 +- 2 files changed, 61 insertions(+), 19 deletions(-) diff --git a/packages/driver/cypress/e2e/cy/snapshot.cy.js b/packages/driver/cypress/e2e/cy/snapshot.cy.js index 43c0c853c226..f6733a9af47c 100644 --- a/packages/driver/cypress/e2e/cy/snapshot.cy.js +++ b/packages/driver/cypress/e2e/cy/snapshot.cy.js @@ -174,38 +174,78 @@ describe('driver/src/cy/snapshots', () => { expect(body.get().find('iframe').css('height')).to.equal('70px') }) + }) - it('captures a protocol snapshot with highlight elements', { - protocolEnabled: true, - }, function () { + context('protocol', () => { + beforeEach(() => { // set to 0 to ensure protocol snapshots are taken // since the driver support file sets the value to 1 Cypress.config('numTestsKeptInMemory', 0) + }) - const element = $('