From c7171fa7b1efb06508dc2bb2ab9e03f727b46f2a Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Thu, 7 Nov 2024 22:13:21 +0900 Subject: [PATCH] test(e2e): fix state diagram `useMaxWidth` tests These tests assume that we're using `look: classic, theme: default`, otherwise the widths are off. However, since 3dc66a64c (MC-1730 Making neo the default theme, 2024-08-06), `neo` is now the default look and theme in Alana Mermaid. Fixes: 3dc66a64c7bd5c069454012848c4b87c0fb25c32 --- cypress/integration/rendering/stateDiagram-v2.spec.js | 4 ++-- cypress/integration/rendering/stateDiagram.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/rendering/stateDiagram-v2.spec.js b/cypress/integration/rendering/stateDiagram-v2.spec.js index 606a1a3f5..29635b27c 100644 --- a/cypress/integration/rendering/stateDiagram-v2.spec.js +++ b/cypress/integration/rendering/stateDiagram-v2.spec.js @@ -460,7 +460,7 @@ stateDiagram-v2 [*] --> State1 State1 --> [*] `, - { state: { useMaxWidth: true } } + { state: { useMaxWidth: true }, look: 'classic' } ); cy.get('svg').should((svg) => { expect(svg).to.have.attr('width', '100%'); @@ -482,7 +482,7 @@ stateDiagram-v2 [*] --> State1 State1 --> [*] `, - { state: { useMaxWidth: false } } + { state: { useMaxWidth: false }, look: 'classic' } ); cy.get('svg').should((svg) => { // const height = parseFloat(svg.attr('height')); diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js index 9be1f2322..aaa2dde4c 100644 --- a/cypress/integration/rendering/stateDiagram.spec.js +++ b/cypress/integration/rendering/stateDiagram.spec.js @@ -338,7 +338,7 @@ describe('State diagram', () => { [*] --> State1 State1 --> [*] `, - { state: { useMaxWidth: true } } + { state: { useMaxWidth: true }, look: 'classic', theme: 'default' } ); cy.get('svg').should((svg) => { expect(svg).to.have.attr('width', '100%'); @@ -361,7 +361,7 @@ describe('State diagram', () => { [*] --> State1 State1 --> [*] `, - { state: { useMaxWidth: false } } + { state: { useMaxWidth: false }, look: 'classic', theme: 'default' } ); cy.get('svg').should((svg) => { // const height = parseFloat(svg.attr('height'));