mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 19:09:44 +02:00
Added linting
This commit is contained in:
@@ -846,7 +846,6 @@ end
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('Title and arrow styling #4813', () => {
|
describe('Title and arrow styling #4813', () => {
|
||||||
|
|
||||||
it('should render a flowchart with title', () => {
|
it('should render a flowchart with title', () => {
|
||||||
const titleString = 'Test Title';
|
const titleString = 'Test Title';
|
||||||
renderGraph(
|
renderGraph(
|
||||||
@@ -855,10 +854,9 @@ describe('Title and arrow styling #4813', () => {
|
|||||||
---
|
---
|
||||||
flowchart LR
|
flowchart LR
|
||||||
A-->B`,
|
A-->B`,
|
||||||
{ flowchart: { defaultRenderer: "elk" } }
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
);
|
);
|
||||||
cy.get('svg').should((svg) => {
|
cy.get('svg').should((svg) => {
|
||||||
|
|
||||||
const title = svg[0].querySelector('text');
|
const title = svg[0].querySelector('text');
|
||||||
expect(title.textContent).to.contain(titleString);
|
expect(title.textContent).to.contain(titleString);
|
||||||
});
|
});
|
||||||
@@ -873,7 +871,7 @@ describe('Title and arrow styling #4813', () => {
|
|||||||
B-.-oC
|
B-.-oC
|
||||||
C==xD
|
C==xD
|
||||||
D ~~~ A`,
|
D ~~~ A`,
|
||||||
{ flowchart: { defaultRenderer: "elk" } }
|
{ flowchart: { defaultRenderer: 'elk' } }
|
||||||
);
|
);
|
||||||
cy.get('svg').should((svg) => {
|
cy.get('svg').should((svg) => {
|
||||||
const edges = svg[0].querySelectorAll('.edges path');
|
const edges = svg[0].querySelectorAll('.edges path');
|
||||||
@@ -883,4 +881,4 @@ describe('Title and arrow styling #4813', () => {
|
|||||||
expect(edges[3]).to.have.css('stroke-width', '1.5px');
|
expect(edges[3]).to.have.css('stroke-width', '1.5px');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
@@ -758,7 +758,7 @@ const insertEdge = function (edgesEl, edge, edgeData, diagObj, parentLookupDb, i
|
|||||||
.attr('class', 'path ' + edgeData.classes)
|
.attr('class', 'path ' + edgeData.classes)
|
||||||
.attr('fill', 'none');
|
.attr('fill', 'none');
|
||||||
Object.entries(edgeData).forEach(([key, value]) => {
|
Object.entries(edgeData).forEach(([key, value]) => {
|
||||||
if (key !== 'classes'){
|
if (key !== 'classes') {
|
||||||
edgePath.attr(key, value);
|
edgePath.attr(key, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user