From c294a0a9acdeae3f3377a6b98eaa01e35b5db9f9 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Thu, 23 Nov 2023 22:41:22 +0530 Subject: [PATCH] test: Add flowchart-elk overriding test --- .../integration/other/flowchart-elk.spec.js | 14 +++++++++++ cypress/platform/flow-elk.html | 23 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 cypress/integration/other/flowchart-elk.spec.js create mode 100644 cypress/platform/flow-elk.html diff --git a/cypress/integration/other/flowchart-elk.spec.js b/cypress/integration/other/flowchart-elk.spec.js new file mode 100644 index 000000000..22a6efc0f --- /dev/null +++ b/cypress/integration/other/flowchart-elk.spec.js @@ -0,0 +1,14 @@ +import { urlSnapshotTest, openURLAndVerifyRendering } from '../../helpers/util.ts'; + +describe('Flowchart elk', () => { + it('should use dagre as fallback', () => { + urlSnapshotTest('http://localhost:9000/flow-elk.html', { + name: 'flow-elk fallback to dagre', + }); + }); + it('should allow overriding with external package', () => { + urlSnapshotTest('http://localhost:9000/flow-elk.html?elk=true', { + name: 'flow-elk overriding dagre with elk', + }); + }); +}); diff --git a/cypress/platform/flow-elk.html b/cypress/platform/flow-elk.html new file mode 100644 index 000000000..149e93951 --- /dev/null +++ b/cypress/platform/flow-elk.html @@ -0,0 +1,23 @@ + + +
+      flowchart-elk
+      a[hello] --> b[world]
+      b --> c{test}
+      c --> one
+      c --> two
+      c --> three
+    
+ + + +