From 72dd98b4641be985a22eae48792caaef2501f7ab Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 7 Oct 2022 22:00:32 +0200 Subject: [PATCH] fix(tests): zoom action tests to check for containing str --- e2e/cypress/component/1-store/viewpane/setMaxZoom.cy.ts | 5 ++++- e2e/cypress/component/1-store/viewpane/setMinZoom.cy.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/e2e/cypress/component/1-store/viewpane/setMaxZoom.cy.ts b/e2e/cypress/component/1-store/viewpane/setMaxZoom.cy.ts index 559fce97..ef2f7ffb 100644 --- a/e2e/cypress/component/1-store/viewpane/setMaxZoom.cy.ts +++ b/e2e/cypress/component/1-store/viewpane/setMaxZoom.cy.ts @@ -29,6 +29,9 @@ describe('Store Action: `setMaxZoom`', () => { bubbles: true, }) - cy.transformationPane().should('have.css', 'transform', 'matrix(2, 0, 0, 2, -800, -236)') + cy.transformationPane().then(($el) => { + const transform = $el.css('transform') + expect(transform).to.contain('matrix(2,') + }) }) }) diff --git a/e2e/cypress/component/1-store/viewpane/setMinZoom.cy.ts b/e2e/cypress/component/1-store/viewpane/setMinZoom.cy.ts index 49f13be9..5e7e5e57 100644 --- a/e2e/cypress/component/1-store/viewpane/setMinZoom.cy.ts +++ b/e2e/cypress/component/1-store/viewpane/setMinZoom.cy.ts @@ -29,6 +29,9 @@ describe('Store Action: `setMinZoom`', () => { bubbles: true, }) - cy.transformationPane().should('have.css', 'transform', 'matrix(0.5, 0, 0, 0.5, -12.5, 128.5)') + cy.transformationPane().then(($el) => { + const transform = $el.css('transform') + expect(transform).to.contain('matrix(0.5') + }) }) })