From 844a175039f5ba563cad9eac2d16cd6e247c2235 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 21 Aug 2023 12:30:04 +0530 Subject: [PATCH] chore: Add test with both frontmatter and directive --- .../rendering/conf-and-directives.spec.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cypress/integration/rendering/conf-and-directives.spec.js b/cypress/integration/rendering/conf-and-directives.spec.js index ca1fccf49..401a24894 100644 --- a/cypress/integration/rendering/conf-and-directives.spec.js +++ b/cypress/integration/rendering/conf-and-directives.spec.js @@ -133,6 +133,27 @@ config: themeVariables: primaryColor: '#ff0000' --- +graph TD + A(Start) --> B[/Another/] + A[/Another/] --> C[End] + subgraph section + B + C + end + `, + { theme: 'forest' } + ); + }); + it('Theme from initialize, frontmatter overriding theme variable, directive overriding primaryColor - nodes should be red', () => { + imgSnapshotTest( + ` +--- +config: + theme: base + themeVariables: + primaryColor: '#00ff00' +--- +%%{init: {'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%% graph TD A(Start) --> B[/Another/] A[/Another/] --> C[End]