From 55532c00b4898fb6571ecd2dfec4eec5a1814e59 Mon Sep 17 00:00:00 2001 From: Marc Faber Date: Wed, 18 Nov 2020 00:34:02 +0100 Subject: [PATCH] Revert updates on integration tests due to failing PR tests --- cypress/integration/rendering/flowchart-v2.spec.js | 4 ++-- cypress/integration/rendering/sequencediagram.spec.js | 4 ++-- cypress/integration/rendering/stateDiagram-v2.spec.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index ecba0168c..e335274b9 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -101,7 +101,7 @@ describe('Flowchart v2', () => { const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); - expect(maxWidthValue).to.be.within(300 * .95-2, 300 * 1.05); + expect(maxWidthValue).to.be.within(300 * .95-1, 300 * 1.05); }); }); it('8: should render a flowchart when useMaxWidth is false', () => { @@ -121,7 +121,7 @@ describe('Flowchart v2', () => { const width = parseFloat(svg.attr('width')); // use within because the absolute value can be slightly different depending on the environment ±5% expect(height).to.be.within(446 * .95, 446 * 1.05); - expect(width).to.be.within(300 * .95-2, 300 * 1.05); + expect(width).to.be.within(300 * .95-1, 300 * 1.05); expect(svg).to.not.have.attr('style'); }); }); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index 52eee3ccd..bb460418f 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -564,7 +564,7 @@ context('Sequence diagram', () => { expect(svg).to.have.attr('width', '100%'); expect(svg).to.have.attr('height'); const height = parseFloat(svg.attr('height')); - expect(height).to.eq(960); + expect(height).to.eq(920); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); @@ -604,7 +604,7 @@ context('Sequence diagram', () => { .should((svg) => { const height = parseFloat(svg.attr('height')); const width = parseFloat(svg.attr('width')); - expect(height).to.eq(960); + expect(height).to.eq(920); // use within because the absolute value can be slightly different depending on the environment ±5% expect(width).to.be.within(820 * .95, 820 * 1.05); expect(svg).to.not.have.attr('style'); diff --git a/cypress/integration/rendering/stateDiagram-v2.spec.js b/cypress/integration/rendering/stateDiagram-v2.spec.js index 7ebb4ae7b..9013ec64f 100644 --- a/cypress/integration/rendering/stateDiagram-v2.spec.js +++ b/cypress/integration/rendering/stateDiagram-v2.spec.js @@ -369,7 +369,7 @@ describe('State diagram', () => { expect(svg).to.have.attr('width', '100%'); expect(svg).to.have.attr('height'); const height = parseFloat(svg.attr('height')); - expect(height).to.eq(178); + expect(height).to.eq(177); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); @@ -391,7 +391,7 @@ describe('State diagram', () => { .should((svg) => { const height = parseFloat(svg.attr('height')); const width = parseFloat(svg.attr('width')); - expect(height).to.eq(178); + expect(height).to.eq(177); // use within because the absolute value can be slightly different depending on the environment ±5% expect(width).to.be.within(135 * .95, 135 * 1.05); expect(svg).to.not.have.attr('style');