mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Update cypress/integration/rendering/sequencediagram.spec.js
This commit is contained in:
parent
9fb6f1998f
commit
8d6d90021a
@ -34,10 +34,7 @@ context('Sequence diagram', () => {
|
|||||||
{ sequence: { useMaxWidth: false } }
|
{ sequence: { useMaxWidth: false } }
|
||||||
);
|
);
|
||||||
cy.get('svg').should((svg) => {
|
cy.get('svg').should((svg) => {
|
||||||
// const height = parseFloat(svg.attr('height'));
|
|
||||||
const width = parseFloat(svg.attr('width'));
|
const width = parseFloat(svg.attr('width'));
|
||||||
// expect(height).to.be.within(920, 971);
|
|
||||||
// use within because the absolute value can be slightly different depending on the environment ±5%
|
|
||||||
expect(width).to.be.within(830 * 0.95, 830 * 1.05);
|
expect(width).to.be.within(830 * 0.95, 830 * 1.05);
|
||||||
expect(svg).to.not.have.attr('style');
|
expect(svg).to.not.have.attr('style');
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user