Reverting PR #2312

This commit is contained in:
Ashish Jain
2021-09-29 18:22:35 +02:00
parent 4839e6a8b3
commit 38ef061175
10 changed files with 28 additions and 12 deletions

View File

@@ -450,7 +450,9 @@ stateDiagram-v2
cy.get('svg')
.should((svg) => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.be.within(177, 178);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));