mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
temp: Revert all changes is cypress folder
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
import { urlSnapshotTest } from '../../helpers/util.ts';
|
|
||||||
|
|
||||||
describe('Examples', () => {
|
|
||||||
it('should render all examples', () => {
|
|
||||||
urlSnapshotTest('http://localhost:9000/examples.html');
|
|
||||||
});
|
|
||||||
});
|
|
@@ -1,36 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Examples</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script type="module">
|
|
||||||
import mermaid from './mermaid.esm.mjs';
|
|
||||||
import { diagramData } from './mermaid-examples.esm.mjs';
|
|
||||||
for (const d of diagramData) {
|
|
||||||
const div = document.createElement('div');
|
|
||||||
const h1 = document.createElement('h1');
|
|
||||||
h1.appendChild(document.createTextNode(d.name));
|
|
||||||
div.appendChild(h1);
|
|
||||||
div.appendChild(document.createTextNode(d.description));
|
|
||||||
for (const example of d.examples) {
|
|
||||||
const pre = document.createElement('pre');
|
|
||||||
pre.classList.add('mermaid');
|
|
||||||
pre.textContent = example.code;
|
|
||||||
div.appendChild(pre);
|
|
||||||
}
|
|
||||||
document.body.appendChild(div);
|
|
||||||
}
|
|
||||||
mermaid.initialize({
|
|
||||||
startOnLoad: false,
|
|
||||||
logLevel: 0,
|
|
||||||
});
|
|
||||||
await mermaid.run();
|
|
||||||
if (window.Cypress) {
|
|
||||||
window.rendered = true;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -40,7 +40,6 @@ graph TB
|
|||||||
const el = document.getElementById('d2');
|
const el = document.getElementById('d2');
|
||||||
const { svg } = await mermaid.render('d22', value);
|
const { svg } = await mermaid.render('d22', value);
|
||||||
console.log(svg);
|
console.log(svg);
|
||||||
console.log(mermaid.getDiagramData());
|
|
||||||
el.innerHTML = svg;
|
el.innerHTML = svg;
|
||||||
// mermaid.test1('first_slow', 1200).then((r) => console.info(r));
|
// mermaid.test1('first_slow', 1200).then((r) => console.info(r));
|
||||||
// mermaid.test1('second_fast', 200).then((r) => console.info(r));
|
// mermaid.test1('second_fast', 200).then((r) => console.info(r));
|
||||||
|
Reference in New Issue
Block a user