Commit d183a617 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Change brush event handler

parent bf6b75cc
Pipeline #12162 passed with stage
in 54 seconds
...@@ -50,7 +50,7 @@ describe("Test Genome Browser", () => { ...@@ -50,7 +50,7 @@ describe("Test Genome Browser", () => {
const genomeBrowserData = genomeBrowserDataLayout( const genomeBrowserData = genomeBrowserDataLayout(
genomeBrowserState, genomeBrowserState,
(scale, state: GenomeBrowserState) => console.log(scale), (scale, state: GenomeBrowserState) => [scale, state],
(geneLocation, state: GenomeBrowserState) => console.log(geneLocation) (geneLocation, state: GenomeBrowserState) => console.log(geneLocation)
); );
const data: GenomeBrowserData[] = [genomeBrowserData]; const data: GenomeBrowserData[] = [genomeBrowserData];
...@@ -61,15 +61,23 @@ describe("Test Genome Browser", () => { ...@@ -61,15 +61,23 @@ describe("Test Genome Browser", () => {
container container
.datum<GenomeBrowserData[]>(data) .datum<GenomeBrowserData[]>(data)
.call(genomeBrowserComponent); .call(genomeBrowserComponent);
//
test("Test all dom element", () => { test("Test all dom element", () => {
// This is test is too much. Should find a smarter one that won't break // This is test is too much. Should find a smarter one that won't break
// for small changement. // for small changement.
expect(container.html()).toBe(result); expect(container.html()).toBe(result);
}) })
//
test("Test transform data", () => { test("Test transform data", () => {
expect(genomeBrowserData.selectedChromosome.genes.length).toBe(2); expect(genomeBrowserData.selectedChromosome.genes.length).toBe(2);
}); });
//
test("test window data", () => { test("test window data", () => {
expect(genomeBrowserData.selectedChromosome.window).toBe(genomeBrowserState.window); expect(genomeBrowserData.selectedChromosome.window).toBe(genomeBrowserState.window);
expect(genomeBrowserData.selectedChromosome.window).toBe(genomeBrowserData.chromosome.ruler.window); expect(genomeBrowserData.selectedChromosome.window).toBe(genomeBrowserData.chromosome.ruler.window);
......
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