diff --git a/cypress/integration/rendering/erDiagram.spec.js b/cypress/integration/rendering/erDiagram.spec.js index fc93fb5bb..78a34febc 100644 --- a/cypress/integration/rendering/erDiagram.spec.js +++ b/cypress/integration/rendering/erDiagram.spec.js @@ -114,7 +114,7 @@ describe('Entity Relationship Diagram', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height', '465'); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); @@ -174,7 +174,7 @@ describe('Entity Relationship Diagram', () => { renderGraph( ` erDiagram - PRIVATE_FINANCIAL_INSTITUTION { + PRIVATE_FINANCIAL_INSTITUTION { string name int turnover } diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index af83eb555..d2548a409 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -94,10 +94,7 @@ describe('Flowchart v2', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - // use within because the absolute value can be slightly different depending on the environment ±5% - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(446 * .95, 446 * 1.05); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js index 4c9056711..2560b7827 100644 --- a/cypress/integration/rendering/flowchart.spec.js +++ b/cypress/integration/rendering/flowchart.spec.js @@ -745,10 +745,7 @@ describe('Graph', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - // use within because the absolute value can be slightly different depending on the environment ±5% - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(446 * .95, 446 * 1.05); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index 0ac1e0f1f..1dcaf1747 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -202,10 +202,7 @@ describe('Gantt diagram', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - // use within because the absolute value can be slightly different depending on the environment ±5% - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(484 * .95, 484 * 1.05); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/pie.spec.js b/cypress/integration/rendering/pie.spec.js index bbedb9ebd..726fabbd3 100644 --- a/cypress/integration/rendering/pie.spec.js +++ b/cypress/integration/rendering/pie.spec.js @@ -50,9 +50,7 @@ describe('Pie Chart', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - const height = parseFloat(svg.attr('height')); - expect(height).to.eq(450); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index 7a35f79c5..cc696c4b8 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -582,9 +582,7 @@ context('Sequence diagram', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(920, 960); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/stateDiagram-v2.spec.js b/cypress/integration/rendering/stateDiagram-v2.spec.js index d72ca0b90..5dd502f28 100644 --- a/cypress/integration/rendering/stateDiagram-v2.spec.js +++ b/cypress/integration/rendering/stateDiagram-v2.spec.js @@ -450,9 +450,7 @@ stateDiagram-v2 cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(177, 178); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js index 971470a75..5790aeb0c 100644 --- a/cypress/integration/rendering/stateDiagram.spec.js +++ b/cypress/integration/rendering/stateDiagram.spec.js @@ -356,9 +356,7 @@ describe('State diagram', () => { cy.get('svg') .should((svg) => { expect(svg).to.have.attr('width', '100%'); - expect(svg).to.have.attr('height'); - const height = parseFloat(svg.attr('height')); - expect(height).to.be.within(176,178); + expect(svg).to.have.attr('height', '100%'); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));