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

@@ -584,7 +584,7 @@ context('Sequence diagram', () => {
expect(svg).to.have.attr('width', '100%');
expect(svg).to.have.attr('height');
const height = parseFloat(svg.attr('height'));
expect(height).to.eq(920);
expect(height).to.be.within(920, 960);
const style = svg.attr('style');
expect(style).to.match(/^max-width: [\d.]+px;$/);
const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join(''));
@@ -624,7 +624,7 @@ context('Sequence diagram', () => {
.should((svg) => {
const height = parseFloat(svg.attr('height'));
const width = parseFloat(svg.attr('width'));
expect(height).to.eq(920);
expect(height).to.be.within(920, 960);
// use within because the absolute value can be slightly different depending on the environment ±5%
expect(width).to.be.within(820 * .95, 820 * 1.05);
expect(svg).to.not.have.attr('style');