Commit 9fa7ea91 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Add test on genome browser width

parent f5ecaa26
Pipeline #12080 passed with stage
in 1 minute
......@@ -33,13 +33,17 @@ describe("Test Selected Chromosome", () => {
'<div><svg width="500"><g id="container"></g></svg></div>';
const container = select("svg")
.select<SVGGElement>("g");
const width = 1500;
container
.datum<SelectedChromosomeData[]>(data)
.call(selectedChromosomeComponent, 1500);
.call(selectedChromosomeComponent, width);
// Start tests
test("Test data to DOM elements", () => {
expect(container.html()).toBe(result);
})
test("Width background rectangle", () => {
const displayWidth = parseInt(container.select(".genome-browser-background").attr("width"));
expect(displayWidth).toBe(width);
})
})
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment