mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 02:44:17 +01:00 
			
		
		
		
	Add test
This commit is contained in:
		
							
								
								
									
										19
									
								
								cypress/integration/rendering/zenuml.spec.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								cypress/integration/rendering/zenuml.spec.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| import { imgSnapshotTest } from '../../helpers/util.js'; | ||||
|  | ||||
| describe('Zen UML', () => { | ||||
|   it('Basic Zen UML diagram', () => { | ||||
|     imgSnapshotTest( | ||||
|       ` | ||||
|     zenuml | ||||
| 			A.method() { | ||||
|         if(x) { | ||||
|           B.method() { | ||||
|             selfCall() { return X } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     `, | ||||
|       {} | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
| @@ -1,5 +1,6 @@ | ||||
| import mermaid2 from './mermaid.esm.mjs'; | ||||
| import externalExample from '../../packages/mermaid-example-diagram/dist/mermaid-example-diagram.core.mjs'; | ||||
| import zenUml from '../../packages/mermaid-zenuml/dist/mermaid-zenuml.core.mjs'; | ||||
|  | ||||
| function b64ToUtf8(str) { | ||||
|   return decodeURIComponent(escape(window.atob(str))); | ||||
| @@ -44,7 +45,7 @@ const contentLoaded = async function () { | ||||
|       document.getElementsByTagName('body')[0].appendChild(div); | ||||
|     } | ||||
|  | ||||
|     await mermaid2.registerExternalDiagrams([externalExample]); | ||||
|     await mermaid2.registerExternalDiagrams([externalExample, zenUml]); | ||||
|     mermaid2.initialize(graphObj.mermaid); | ||||
|     await mermaid2.run(); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sidharth Vinod
					Sidharth Vinod