From 867484a2ccb26c5a314e42ec4275a3a4bf02fabb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 19 Apr 2025 18:12:03 +0530 Subject: [PATCH] Revert "temp: Remove tests to check if cypress passes" This reverts commit b0b76ef7a234d5e7a1a3a958f8eb5bbc635cf42f. --- .../rendering/flowchart-icon.spec.js | 32 +++++++++++++++++++ .../rendering/flowchart-v2.spec.js | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 cypress/integration/rendering/flowchart-icon.spec.js diff --git a/cypress/integration/rendering/flowchart-icon.spec.js b/cypress/integration/rendering/flowchart-icon.spec.js new file mode 100644 index 000000000..be7dd7b70 --- /dev/null +++ b/cypress/integration/rendering/flowchart-icon.spec.js @@ -0,0 +1,32 @@ +import { imgSnapshotTest } from '../../helpers/util.ts'; + +const themes = ['default', 'forest', 'dark', 'base', 'neutral']; + +themes.forEach((theme, index) => { + describe('Flowchart Icon', () => { + it(`${index + 1}-icon: verify if icons are working from fontawesome library ${theme} theme`, () => { + imgSnapshotTest( + `flowchart TD + A("fab:fa-twitter Twitter") --> B("fab:fa-facebook Facebook") + B --> C("fa:fa-coffee Coffee") + C --> D("fa:fa-car Car") + D --> E("fab:fa-github GitHub") + `, + { theme } + ); + }); + }); +}); + +themes.forEach((theme, index) => { + describe('Flowchart Icon', () => { + it(`${index + 1}-icon: verify if registered icons are working on ${theme} theme`, () => { + imgSnapshotTest( + `flowchart TD + A("fa:fa-bell Bell") + `, + { theme } + ); + }); + }); +}); diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index 97fc1ecbd..7256944d1 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -86,7 +86,7 @@ describe('Flowchart v2', () => { B --> C{Let me think} C -->|One| D[Laptop] C -->|Two| E[iPhone] - C -->|Three| F[fa:fa-car Car] + C -->|Three| F[Car] `, { flowchart: { useMaxWidth: true } } ); @@ -109,7 +109,7 @@ describe('Flowchart v2', () => { B --> C{Let me think} C -->|One| D[Laptop] C -->|Two| E[iPhone] - C -->|Three| F[fa:fa-car Car] + C -->|Three| F[Car] `, { flowchart: { useMaxWidth: false } } );