Fixes for rendering tests

This commit is contained in:
Knut Sveidqvist
2022-07-20 14:39:01 +02:00
parent 27cf50044d
commit 8681e78e50
10 changed files with 81 additions and 54 deletions

View File

@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View File

@@ -42,7 +42,8 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) =>
if (!options.fontSize) {
options.fontSize = '16px';
}
const useAppli = Cypress.env('useAppli');
// const useAppli = Cypress.env('useAppli');
const useAppli = false;
const branch = Cypress.env('codeBranch');
cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot');
const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-');

View File

@@ -80,7 +80,7 @@ context('Sequence diagram', () => {
loop Loopy
Bob->>Alice: Pasten
end `,
{}
{ wrap: true }
);
});
context('font settings', () => {

View File

@@ -64,7 +64,7 @@ journey
commit
commit
</div>
<div class="mermaid" style="width: 50%;">
<div class="mermaid2" style="width: 50%;">
sequenceDiagram
title: My Sequence Diagram Title
accTitle: My Acc Sequence Diagram
@@ -218,20 +218,41 @@ class Class10 {
}
</div>
<div class="mermaid" style="width: 100%;">
graph LR
A[[subroutine shape test]]
A -->|Get money| B[[Go shopping]]
B --> C[[Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?]]
C -->|One| D[[Laptop]]
C -->|Two| E[[iPhone]]
C -->|Three| F[[Car<br/>wroom wroom]]
click A "index.html#link-clicked" "link test"
click B testClick "click test"
classDef someclass fill:#f96;
class A someclass;
class C someclass;
%%{init: {'config': {'wrap': true }}}%%
sequenceDiagram
participant A as Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
A->>Bob: Hola
Bob-->A: Pasten !
</div>
<div class="mermaid2" style="width: 100%;">
gitGraph
commit id: "ZERO"
branch develop
commit id:"A"
checkout main
commit id:"ONE"
checkout develop
commit id:"B"
branch featureA
commit id:"FIX"
commit id: "FIX-2"
checkout main
commit id:"TWO"
cherry-pick id:"A"
commit id:"THREE"
cherry-pick id:"FIX"
checkout develop
commit id:"C"
merge featureA
</div>
<div class="mermaid2" style="width: 100%;">
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
</div> <div class="mermaid2" style="width: 100%;">
classDiagram
Animal "1" <|-- Duck
Animal <|-- Fish
@@ -292,7 +313,8 @@ graph LR
htmlLabels: true,
},
sequence: {
mirrorActors: false,
// mirrorActors: false,'
wrap: false,
},
// gantt: { axisFormat: '%m/%d/%Y' },
// sequence: {
@@ -315,6 +337,7 @@ graph LR
curve: 'cardinal',
// securityLevel: 'sandbox',
// themeVariables: {relationLabelColor: 'red'}
wrap: true,
});
function callback() {
alert('It worked');