Kitware / candela

Visualization components for the web
https://candela.readthedocs.io
Apache License 2.0
116 stars 29 forks source link

Add rudimentary unit test for TrackerDash #502

Open zackgalbreath opened 7 years ago

zackgalbreath commented 7 years ago

This test currently only verifies that the TrackerDash consists of a single parent element.

zackgalbreath commented 7 years ago

This buys us a pretty good bump in coverage, but this test (as currently written) doesn't do much to protect the behavior of this component.

Thoughts on how to proceed? As I see it, we have two options here:

1) Instead of instantiating TrackerDash directly, build up coverage by testing its individual sub-components instead.

2) Accept this big bump of coverage and gradually try to add more predictive test cases for TrackerDash, even though they won't result in any additional coverage.

jeffbaumes commented 7 years ago

Instead of performing a full test of each component, we could dig in to a few of the sub-components in the TrackerDash DOM with this test. To help the process, you could inspect the TrackerDash example to see what the HTML looks like, then update the test to examine some of the children (e.g. are the right number of bullet charts created? is the summary plot there? do some of the data-driven headings have the correct text?)

waxlamp commented 7 years ago

@zackgalbreath, what do you think of @jeffbaumes's suggestion?

The changes in this PR look good to me, but we have to decide how to go forward with the testing strategy itself.

mgrauer commented 7 years ago

I'd favor setting up the testing skeleton with one or two pieces of meat, then saving the rest of the fill in for later. Once the skeleton is in place, increasing coverage could be a good learning opportunity for someone new to Candela.

waxlamp commented 6 years ago

@zackgalbreath, should we go ahead and merge this now, and decide how to proceed more fully later?

Sorry to revive an old thread but we should definitely do something with this PR :)