candela icon indicating copy to clipboard operation
candela copied to clipboard

Add rudimentary unit test for TrackerDash

Open zackgalbreath opened this issue 7 years ago • 5 comments

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

zackgalbreath avatar Jun 05 '17 15:06 zackgalbreath

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.

zackgalbreath avatar Jun 05 '17 15:06 zackgalbreath

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?)

jeffbaumes avatar Jun 05 '17 16:06 jeffbaumes

@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.

waxlamp avatar Jun 15 '17 21:06 waxlamp

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.

mgrauer avatar Jun 19 '17 13:06 mgrauer

@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 :)

waxlamp avatar Oct 19 '17 15:10 waxlamp