diff --git a/cy/defect-406-alt-under-creation.html b/cy/defect-406-alt-under-creation.html
index 50ee476af..f55d64c75 100644
--- a/cy/defect-406-alt-under-creation.html
+++ b/cy/defect-406-alt-under-creation.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
title Title 1
A.m1 {
new B(1,2,3,4) {
@@ -35,6 +35,6 @@
>
-
+
diff --git a/cy/smoke-creation.html b/cy/smoke-creation.html
index 2fbaa7f53..4a34cf58f 100644
--- a/cy/smoke-creation.html
+++ b/cy/smoke-creation.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
title Title 1
A.m {
new B(1,2,3,4)
@@ -21,6 +21,6 @@
>
-
+
diff --git a/cy/smoke-fragment-issue.html b/cy/smoke-fragment-issue.html
index 027110a21..aa4242b63 100644
--- a/cy/smoke-fragment-issue.html
+++ b/cy/smoke-fragment-issue.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
// This sample is carefully crafted. It shows a known issues: fragment stretched to
// svc (should not), because parser thinks the return statement returns to svc.
group G {@VPC svc @RDS rep} Client
@@ -30,6 +30,6 @@
>
-
+
diff --git a/cy/smoke-fragment.html b/cy/smoke-fragment.html
index b992775ed..dfd5289a3 100644
--- a/cy/smoke-fragment.html
+++ b/cy/smoke-fragment.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
A
B
C #FF0000 // we style it to make it more important in image comparison
@@ -38,6 +38,6 @@
-
+
diff --git a/cy/smoke-interaction.html b/cy/smoke-interaction.html
index 4b698d0f2..45f380683 100644
--- a/cy/smoke-interaction.html
+++ b/cy/smoke-interaction.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
if(x) {
A.method() {
B.method() {
@@ -29,6 +29,6 @@
-
+
diff --git a/cy/smoke-return.html b/cy/smoke-return.html
index 4d6342090..c2b7cec3a 100644
--- a/cy/smoke-return.html
+++ b/cy/smoke-return.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
Browser->BookController.onPost() {
BookLibService.Borrow(id) {
receipt = process(id1)
@@ -33,6 +33,6 @@
>
-
+
diff --git a/cy/smoke.html b/cy/smoke.html
index 60fe83720..e9a93f485 100644
--- a/cy/smoke.html
+++ b/cy/smoke.html
@@ -1,4 +1,4 @@
-
+
@@ -13,7 +13,7 @@
-
+
title ABCD Title
// Generating Sequence Diagrams from Java code is experimental.
@@ -37,6 +37,6 @@
>
-
+
diff --git a/cypress/e2e/__image_snapshots__/Smoke test should load the home page #0.png b/cypress/e2e/__image_snapshots__/Smoke test should load the home page #0.png
index 31c50c55c..56627e7c0 100644
Binary files a/cypress/e2e/__image_snapshots__/Smoke test should load the home page #0.png and b/cypress/e2e/__image_snapshots__/Smoke test should load the home page #0.png differ
diff --git a/src/main-cy.ts b/src/main-cy.ts
new file mode 100644
index 000000000..a32e6148b
--- /dev/null
+++ b/src/main-cy.ts
@@ -0,0 +1,24 @@
+import parentLogger from "./logger/logger";
+import ZenUml from "./core";
+const logger = parentLogger.child({ name: "main" });
+
+// find the fist element with tag `pre` and class `zenuml`
+const elm = document.querySelector("pre.zenuml");
+// get the code from the element
+const code =
+ elm?.textContent?.trim() ||
+ `
+// comment
+A
+A.method`;
+// @ts-ignore
+const zenUml = new ZenUml(elm);
+console.log("set zenUML to window");
+
+// @ts-ignore
+window.zenUml = zenUml;
+zenUml.render(code, { theme: "theme-nab" }).then((r) => {
+ logger.debug("render resolved", r);
+});
+// @ts-ignore
+window.parentLogger = parentLogger;
diff --git a/src/main.ts b/src/main.ts
index a6ee9eb03..f3e376984 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,9 +1,9 @@
-import parentLogger from './logger/logger';
-import ZenUml from './core';
-const logger = parentLogger.child({ name: 'main' });
+import parentLogger from "./logger/logger";
+import ZenUml from "./core";
+const logger = parentLogger.child({ name: "main" });
// find the fist element with tag `pre` and class `zenuml`
-const elm = document.querySelector('pre.zenuml');
+const elm = document.querySelector("pre.zenuml");
// get the code from the element
const code =
elm?.textContent?.trim() ||
@@ -13,12 +13,12 @@ A
A.method`;
// @ts-ignore
const zenUml = new ZenUml(elm);
-console.log('set zenUML to window');
+console.log("set zenUML to window");
// @ts-ignore
window.zenUml = zenUml;
-zenUml.render(code, {theme: 'theme-nab'}).then((r) => {
- logger.debug('render resolved', r);
+zenUml.render(code, { theme: "theme-default" }).then((r) => {
+ logger.debug("render resolved", r);
});
// @ts-ignore
window.parentLogger = parentLogger;