mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-22 17:56:43 +02:00
Revert updates on integration tests due to failing PR tests
This commit is contained in:
@@ -101,7 +101,7 @@ describe('Flowchart v2', () => {
|
|||||||
const style = svg.attr('style');
|
const style = svg.attr('style');
|
||||||
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
||||||
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
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', () => {
|
it('8: should render a flowchart when useMaxWidth is false', () => {
|
||||||
@@ -121,7 +121,7 @@ describe('Flowchart v2', () => {
|
|||||||
const width = parseFloat(svg.attr('width'));
|
const width = parseFloat(svg.attr('width'));
|
||||||
// use within because the absolute value can be slightly different depending on the environment ±5%
|
// 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(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');
|
expect(svg).to.not.have.attr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -564,7 +564,7 @@ context('Sequence diagram', () => {
|
|||||||
expect(svg).to.have.attr('width', '100%');
|
expect(svg).to.have.attr('width', '100%');
|
||||||
expect(svg).to.have.attr('height');
|
expect(svg).to.have.attr('height');
|
||||||
const height = parseFloat(svg.attr('height'));
|
const height = parseFloat(svg.attr('height'));
|
||||||
expect(height).to.eq(960);
|
expect(height).to.eq(920);
|
||||||
const style = svg.attr('style');
|
const style = svg.attr('style');
|
||||||
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
||||||
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
||||||
@@ -604,7 +604,7 @@ context('Sequence diagram', () => {
|
|||||||
.should((svg) => {
|
.should((svg) => {
|
||||||
const height = parseFloat(svg.attr('height'));
|
const height = parseFloat(svg.attr('height'));
|
||||||
const width = parseFloat(svg.attr('width'));
|
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%
|
// 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(width).to.be.within(820 * .95, 820 * 1.05);
|
||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
|
@@ -369,7 +369,7 @@ describe('State diagram', () => {
|
|||||||
expect(svg).to.have.attr('width', '100%');
|
expect(svg).to.have.attr('width', '100%');
|
||||||
expect(svg).to.have.attr('height');
|
expect(svg).to.have.attr('height');
|
||||||
const height = parseFloat(svg.attr('height'));
|
const height = parseFloat(svg.attr('height'));
|
||||||
expect(height).to.eq(178);
|
expect(height).to.eq(177);
|
||||||
const style = svg.attr('style');
|
const style = svg.attr('style');
|
||||||
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
expect(style).to.match(/^max-width: [\d.]+px;$/);
|
||||||
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
|
||||||
@@ -391,7 +391,7 @@ describe('State diagram', () => {
|
|||||||
.should((svg) => {
|
.should((svg) => {
|
||||||
const height = parseFloat(svg.attr('height'));
|
const height = parseFloat(svg.attr('height'));
|
||||||
const width = parseFloat(svg.attr('width'));
|
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%
|
// 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(width).to.be.within(135 * .95, 135 * 1.05);
|
||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
|
Reference in New Issue
Block a user