From 1598ac713fe917b045bb8e752d0948ea8f09a21d Mon Sep 17 00:00:00 2001 From: yari-dewalt Date: Thu, 14 Nov 2024 10:35:03 -0800 Subject: [PATCH] Update testing html files --- cypress/platform/neo-test.html | 396 ++++++++++++++++++++++++++++++ cypress/platform/size-tester.html | 70 +++++- 2 files changed, 465 insertions(+), 1 deletion(-) diff --git a/cypress/platform/neo-test.html b/cypress/platform/neo-test.html index 9473d4c24..a23e74114 100644 --- a/cypress/platform/neo-test.html +++ b/cypress/platform/neo-test.html @@ -113,6 +113,402 @@ handdrawn-default classic-default + + + +
+
+
+              classNode
+            
+
+
+ + +
+          %%{init: {"look": "neo", "theme": "neo", "fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+          
+ + +
+          %%{init: {"look": "neo", "theme": "dark","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+        
+ + +
+          %%{init: {"look": "neo", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+        
+ + +
+          %%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+        
+ + +
+          %%{init: {"look": "handDrawn", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+        
+ + +
+          %%{init: {"look": "classic", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode
+        
+ + + + + +
+
+
+              Filled classNode
+            
+
+
+ + +
+          %%{init: {"look": "neo", "theme": "neo", "fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+          
+ + +
+          %%{init: {"look": "neo", "theme": "dark","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+        
+ + +
+          %%{init: {"look": "neo", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+        
+ + +
+          %%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+        
+ + +
+          %%{init: {"look": "handDrawn", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+        
+ + +
+          %%{init: {"look": "classic", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classNode {
+              +int number
+              method()
+            }
+        
+ + + + + +
+
+
+              classA --> classB
+            
+
+
+ + +
+          %%{init: {"look": "neo", "theme": "neo", "fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+          
+ + +
+          %%{init: {"look": "neo", "theme": "dark","fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+        
+ + +
+          %%{init: {"look": "neo", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+        
+ + +
+          %%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+        
+ + +
+          %%{init: {"look": "handDrawn", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+        
+ + +
+          %%{init: {"look": "classic", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            class classA {
+              +int number
+              method()
+            }
+            class classB {
+              +int number
+              -string text
+              method()
+              another_method()
+            }
+            classA --> classB
+        
+ + + + + +
+
+
+              nameSpace { classA --> classB } note
+            
+
+
+ + +
+          %%{init: {"look": "neo", "theme": "neo", "fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+          
+ + +
+          %%{init: {"look": "neo", "theme": "dark","fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+        
+ + +
+          %%{init: {"look": "neo", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+        
+ + +
+          %%{init: {"look": "neo", "theme": "forest","fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+        
+ + +
+          %%{init: {"look": "handDrawn", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+        
+ + +
+          %%{init: {"look": "classic", "theme": "default","fontFamily": "Arial"} }%%
+          classDiagram
+            namespace myNamespace {
+              class classA {
+                +int number
+                method()
+              }
+              class classB {
+                +int number
+                -string text
+                method()
+                another_method()
+              }
+            }
+            classA "1" o--> "*" classB : label
+            note for classB "This is a note for classB"
+        
+ + diff --git a/cypress/platform/size-tester.html b/cypress/platform/size-tester.html index 32204085c..acf59d24a 100644 --- a/cypress/platform/size-tester.html +++ b/cypress/platform/size-tester.html @@ -54,6 +54,9 @@ //layout: 'elk', fontFamily: 'Kalam', logLevel: 1, + class: { + hideEmptyMembersBox: true, + }, }); let shape = 'circle'; @@ -70,6 +73,41 @@ n84@{ shape: '${shape}'} `; + let code2 = ` + classDiagram + class class1 { + int num + string test + string test + string test + string test + string test + method() + } + class class2 { + int num + string test + string test + string test + string test + string test + method() + method() + } + class class3 { + int test + } + <> class3 + class class4 { + int[] id + method() + method() + method() + method() + } + <> class4 + `; + let positions = { edges: {}, nodes: { @@ -104,7 +142,37 @@ }, }; - const { svg } = await mermaid.render('the-id-of-the-svg', code, undefined, positions); + let positions2 = { + edges: {}, + nodes: { + class1: { + x: 0, + y: 10, + width: 100, + height: 400, + }, + class2: { + x: -300, + y: 100, + width: 100, + height: 0, + }, + class3: { + x: 400, + y: 10, + width: 0, + height: 0, + }, + class4: { + x: 800, + y: 10, + width: 0, + height: 0, + }, + }, + }; + + const { svg } = await mermaid.render('the-id-of-the-svg', code2, undefined, positions2); const elem = document.querySelector('#diagram'); elem.innerHTML = svg;