From ed04d73617df267f3587fb751bc5319d4aef331a Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 19 Feb 2023 22:02:59 +0530 Subject: [PATCH] remove WebpackUsage test --- .../integration/other/webpackUsage.spec.js | 16 -------------- cypress/platform/interaction.html | 22 ++++++++++++------- cypress/platform/viewer.js | 4 ++-- cypress/platform/webpackUsage.html | 19 ---------------- 4 files changed, 16 insertions(+), 45 deletions(-) delete mode 100644 cypress/integration/other/webpackUsage.spec.js delete mode 100644 cypress/platform/webpackUsage.html diff --git a/cypress/integration/other/webpackUsage.spec.js b/cypress/integration/other/webpackUsage.spec.js deleted file mode 100644 index 727fb5ac7..000000000 --- a/cypress/integration/other/webpackUsage.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -describe('Sequencediagram', () => { - it('should render a simple sequence diagrams', () => { - const url = 'http://localhost:9000/webpackUsage.html'; - - cy.visit(url); - cy.get('body').find('svg').should('have.length', 1); - }); - it('should handle html escapings properly', () => { - const url = 'http://localhost:9000/webpackUsage.html?test-html-escaping=true'; - - cy.visit(url); - cy.get('body').find('svg').should('have.length', 1); - - cy.get('g.label > foreignobject > div').should('not.contain.text', ''); - }); -}); diff --git a/cypress/platform/interaction.html b/cypress/platform/interaction.html index 59aadcbbb..a9fe7266b 100644 --- a/cypress/platform/interaction.html +++ b/cypress/platform/interaction.html @@ -17,20 +17,20 @@ graph TB Function-->URL click Function clickByFlow "Add a div" - click URL "http://localhost:9000/webpackUsage.html" "Visit mermaid docs" + click URL "http://localhost:9000/info.html" "Visit mermaid docs"
   graph TB
     1Function-->2URL
     click 1Function clickByFlow "Add a div"
-    click 2URL "http://localhost:9000/webpackUsage.html" "Visit mermaid docs"
+    click 2URL "http://localhost:9000/info.html" "Visit mermaid docs"
       
   classDiagram
     class Test
     class ShapeLink
-    link ShapeLink "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
+    link ShapeLink "http://localhost:9000/info.html" "This is a tooltip for a link"
     class ShapeCallback
     callback ShapeCallback "clickByClass" "This is a tooltip for a callback"
       
@@ -42,7 +42,7 @@
   classDiagram-v2
     class ShapeLink
-    link ShapeLink "http://localhost:9000/webpackUsage.html" "This is a tooltip for a link"
+    link ShapeLink "http://localhost:9000/info.html" "This is a tooltip for a link"
       
@@ -77,7 +77,7 @@ Calling a Callback (look at the console log) :cl2, after cl1, 3d Calling a Callback with args :cl3, after cl1, 3d - click cl1 href "http://localhost:9000/webpackUsage.html" + click cl1 href "http://localhost:9000/info.html" click cl2 call clickByGantt() click cl3 call clickByGantt("test1", test2, test3) @@ -102,9 +102,15 @@ div.className = 'created-by-gant-click'; div.style = 'padding: 20px; background: green; color: white;'; div.innerText = 'Clicked By Gant'; - if (arg1) div.innerText += ' ' + arg1; - if (arg2) div.innerText += ' ' + arg2; - if (arg3) div.innerText += ' ' + arg3; + if (arg1) { + div.innerText += ' ' + arg1; + } + if (arg2) { + div.innerText += ' ' + arg2; + } + if (arg3) { + div.innerText += ' ' + arg3; + } document.getElementsByTagName('body')[0].appendChild(div); } diff --git a/cypress/platform/viewer.js b/cypress/platform/viewer.js index 1c4523d62..e22bbb652 100644 --- a/cypress/platform/viewer.js +++ b/cypress/platform/viewer.js @@ -114,12 +114,12 @@ const contentLoadedApi = async function () { const div = document.createElement('div'); div.id = 'block'; div.className = 'mermaid'; - console.warn('graphObj.mermaid', graphObj.mermaid); + console.warn('graphObj', graphObj); document.getElementsByTagName('body')[0].appendChild(div); mermaid2.initialize(graphObj.mermaid); - const { svg, bindFunctions } = await mermaid2.render('newid', graphObj.code, div); div.innerHTML = svg; + console.log(svg); bindFunctions(div); } } diff --git a/cypress/platform/webpackUsage.html b/cypress/platform/webpackUsage.html deleted file mode 100644 index 23df19f49..000000000 --- a/cypress/platform/webpackUsage.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -
- - -