Skip to content

Commit

Permalink
Fix lint and test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Iuliia Kulagina committed Sep 8, 2023
1 parent 9641777 commit 7c916e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/sankeyDiagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1923,13 +1923,11 @@ export class SankeyDiagram implements IVisual {

const linkKneeSize: number = Math.min(link.destination.width, minHeight);

let x0: number,
x1: number,
y0: number,
let y0: number,
y1: number;

x0 = link.source.x + link.source.width / 2;
x1 = link.destination.x;
const x0 = link.source.x + link.source.width / 2;
const x1 = link.destination.x;

// drawing area as combination of 4 lines in one path element of svg to fill this area with required color

Expand Down
4 changes: 2 additions & 2 deletions test/visualTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ describe("SankeyDiagram", () => {
const defaultWaitForRender: number = 500;

describe("Keyboard Navigation check", () =>{
it("links should have attributes tabindex=0, role=option, aria-label is not null, and aria-selected=false", (done) => {
it("links should have attributes tabindex>0, role=option, aria-label is not null, and aria-selected=false", (done) => {
visualBuilder.updateRenderTimeout(dataView, () => {
// defaults
const someColor: string = "#000000";
Expand All @@ -823,7 +823,7 @@ describe("SankeyDiagram", () => {
let nodes = visualBuilder.linkElements;
nodes.forEach((el: Element) => {
expect(el.getAttribute("role")).toBe("option");
expect(el.getAttribute("tabindex")).toBe("0");
expect(el.getAttribute("tabindex")).toBeGreaterThanOrEqual(1);
expect(el.getAttribute("aria-selected")).toBe("false");
expect(el.getAttribute("aria-label")).not.toBeNull();
});
Expand Down

0 comments on commit 7c916e3

Please sign in to comment.