yarn build and adapt e2e tests

Co-Authored-By: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
MOREL Matthieu
2021-08-05 22:35:34 +02:00
committed by Matthieu Morel
parent 8af36b742e
commit 55faa3cb1a
28 changed files with 62449 additions and 1987 deletions

View File

@@ -452,7 +452,7 @@ stateDiagram-v2
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(177);
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(''));
@@ -474,7 +474,7 @@ stateDiagram-v2
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(177);
expect(height).to.be.within(177, 178);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(135 * .95, 135 * 1.05);
expect(svg).to.not.have.attr('style');