Update cypress/integration/rendering/sequencediagram.spec.js

This commit is contained in:
Sidharth Vinod 2023-02-05 11:54:56 +05:30 committed by GitHub
parent 9fb6f1998f
commit 8d6d90021a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,10 +34,7 @@ context('Sequence diagram', () => {
{ sequence: { useMaxWidth: false } }
);
cy.get('svg').should((svg) => {
// const height = parseFloat(svg.attr('height'));
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(svg).to.not.have.attr('style');
});