Skip to content

Added the ability to pass a function into pileup click handler#483

Open
denisemauldin wants to merge 1 commit into
hammerlab:masterfrom
denisemauldin:provideHandlerPileup
Open

Added the ability to pass a function into pileup click handler#483
denisemauldin wants to merge 1 commit into
hammerlab:masterfrom
denisemauldin:provideHandlerPileup

Conversation

@denisemauldin
Copy link
Copy Markdown

@denisemauldin denisemauldin commented Jun 27, 2018

@akmorrow13 I can't tell how to get the click test to work.

drawnObjectsWith(testDiv, '.pileup') throws a failure even though if I comment out the other tests and remove the resets on testDiv and p, it displays fine in the browser.

There seems to be a timing issue because sometimes var canvasList = testDiv.getElementsByTagName('canvas'); has two elements and sometimes it doesn't. Maybe hasPileupSelector is not an appropriate wait for this test?

I don't know how to get what offset I should provide to the ReactTestUtils.Simulate.click.

Thanks for your help.


This change is Reviewable

@akmorrow13
Copy link
Copy Markdown
Collaborator

@denisemauldin you can run the tests interactively by running the http server and going to test-runner (instructions here).

npm run http-server
open http://localhost:8080/src/test/runner.html

I am not sure if you already tried this but it can help debug the ordering of events.

@denisemauldin
Copy link
Copy Markdown
Author

denisemauldin commented Jun 27, 2018

@akmorrow13 Yeah, that's what I've been doing - http://localhost:8080/src/test/runner.html?grep=FeatureTrack

If I comment out all of the other tests, the p.destroy(), and the testDiv.innerHTML = ''; in the afterEach then it shows the pileup on the screen, but the canvas variable is still undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants