Added linting

This commit is contained in:
Vincent Lam
2023-10-24 16:52:44 -07:00
committed by Vincent Lam
parent 55fac29b3e
commit 6d2904cff1
2 changed files with 4 additions and 6 deletions

View File

@@ -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');
}); });
}); });
}) });

View File

@@ -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);
} }
}); });