This commit is contained in:
Yusuke Wada
2021-09-15 12:47:24 +09:00
parent a448af2897
commit 0839fadbc2
8 changed files with 9 additions and 26 deletions

View File

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