diff --git a/cypress/integration/rendering/flowchart-icon.spec.js b/cypress/integration/rendering/flowchart-icon.spec.js index be7dd7b70..a76e8aabd 100644 --- a/cypress/integration/rendering/flowchart-icon.spec.js +++ b/cypress/integration/rendering/flowchart-icon.spec.js @@ -2,9 +2,9 @@ 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`, () => { +describe('when rendering flowchart with icons', () => { + for (const theme of themes) { + it(`should render icons from fontawesome library on theme ${theme}`, () => { imgSnapshotTest( `flowchart TD A("fab:fa-twitter Twitter") --> B("fab:fa-facebook Facebook") @@ -15,12 +15,8 @@ themes.forEach((theme, index) => { { theme } ); }); - }); -}); -themes.forEach((theme, index) => { - describe('Flowchart Icon', () => { - it(`${index + 1}-icon: verify if registered icons are working on ${theme} theme`, () => { + it(`should render registered icons on theme ${theme}`, () => { imgSnapshotTest( `flowchart TD A("fa:fa-bell Bell") @@ -28,5 +24,5 @@ themes.forEach((theme, index) => { { theme } ); }); - }); + } }); diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index 7256944d1..97fc1ecbd 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[Car] + C -->|Three| F[fa:fa-car 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[Car] + C -->|Three| F[fa:fa-car Car] `, { flowchart: { useMaxWidth: false } } );