diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-horizontal-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-horizontal-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-horizontal-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-horizontal-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-vertical-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-vertical-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-vertical-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-vertical-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-with-outside-flows-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-with-outside-flows-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-with-outside-flows-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-with-outside-flows-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-with-outside-labels-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-with-outside-labels-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-center-fit-with-outside-labels-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-center-diagram-with-outside-labels-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-horizontal-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-horizontal-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-horizontal-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-horizontal-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-vertical-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-vertical-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-vertical-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-vertical-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-with-outside-flows-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-with-outside-flows-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-with-outside-flows-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-with-outside-flows-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-with-outside-labels-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-with-outside-labels-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-fit-with-outside-labels-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-diagram-with-outside-labels-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-horizontal-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-horizontal-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-horizontal-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-horizontal-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-vertical-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-vertical-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-vertical-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-vertical-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-with-outside-flows-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-with-outside-flows-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-with-outside-flows-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-with-outside-flows-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-with-outside-labels-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-with-outside-labels-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-horizontal-vertical-fit-with-outside-labels-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-horizontal-vertical-diagram-with-outside-labels-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-horizontal-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-horizontal-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-horizontal-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-horizontal-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-vertical-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-vertical-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-vertical-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-vertical-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-with-outside-flows-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-with-outside-flows-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-with-outside-flows-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-with-outside-flows-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-with-outside-labels-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-with-outside-labels-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-none-fit-with-outside-labels-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-none-diagram-with-outside-labels-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-horizontal-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-horizontal-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-horizontal-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-horizontal-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-vertical-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-vertical-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-vertical-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-vertical-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-with-outside-flows-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-with-outside-flows-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-with-outside-flows-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-with-outside-flows-load-1-snap.png diff --git a/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-with-outside-labels-diagram-1-snap.png b/test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-with-outside-labels-load-1-snap.png similarity index 100% rename from test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-load-options-vertical-fit-with-outside-labels-diagram-1-snap.png rename to test/e2e/__image_snapshots__/diagram-rendering-test-ts-no-diagram-visual-regression-fit-type-vertical-diagram-with-outside-labels-load-1-snap.png diff --git a/test/e2e/diagram.rendering.test.ts b/test/e2e/diagram.rendering.test.ts index 5413925d86..bdfaded7c8 100644 --- a/test/e2e/diagram.rendering.test.ts +++ b/test/e2e/diagram.rendering.test.ts @@ -40,21 +40,22 @@ describe('no diagram visual regression', () => { [FitType[FitType.Horizontal], FitType.Horizontal], [FitType[FitType.Vertical], FitType.Vertical], [FitType[FitType.Center], FitType.Center], - ])('load options: %s fit', (fitTitle: string, fitType: FitType) => { - const bpmnDiagramPreparation = new BpmnDiagramPreparation(new Map([]), { name: 'non-regression' }, 'diagram', { fit: { type: fitType } }); - const pageTester = new PageTester(bpmnDiagramPreparation, 'viewport', 'BPMN Visualization Non Regression'); - - it.each([['horizontal'], ['vertical'], ['with_outside_flows'], ['with_outside_labels']])('%s diagram', async (fileName: string) => { - await pageTester.expectBpmnDiagramToBeDisplayed(fileName); + ])('fit type: %s', (fitTitle: string, fitType: FitType) => { + describe.each([['horizontal'], ['vertical'], ['with_outside_flows'], ['with_outside_labels']])('diagram %s', (fileName: string) => { + it('load', async () => { + const bpmnDiagramPreparation = new BpmnDiagramPreparation(new Map([]), { name: 'non-regression' }, 'diagram', { fit: { type: fitType } }); + const pageTester = new PageTester(bpmnDiagramPreparation, 'viewport', 'BPMN Visualization Non Regression'); + await pageTester.expectBpmnDiagramToBeDisplayed(fileName); - const image = await page.screenshot({ fullPage: true }); + const image = await page.screenshot({ fullPage: true }); - // minimal threshold to make test pass on Github Workflow - // ubuntu: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot - // macOS: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot - // windows: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot - const config = imageSnapshotConfigurator.getConfig(fileName, 0.000006); - expect(image).toMatchImageSnapshot(config); + // minimal threshold to make test pass on Github Workflow + // ubuntu: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot + // macOS: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot + // windows: Expected image to match or be a close match to snapshot but was 0.0005056149089299744% different from snapshot + const config = imageSnapshotConfigurator.getConfig(fileName, 0.000006); + expect(image).toMatchImageSnapshot(config); + }); }); });