mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
Merge pull request #2312 from cm-wada-yusuke/bug/2160-fixed-height-useMaxWith
configureSvgSize should make height 100% when useMaxWidth is true.
This commit is contained in:
@@ -635,9 +635,7 @@ context('Sequence 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(920, 960);
|
||||
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(''));
|
||||
|
Reference in New Issue
Block a user