Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Add tests for the existing QuestionWidgets. #1426

Closed
heyjamesknight opened this issue Sep 6, 2017 · 4 comments · Fixed by #1485
Closed

Testing: Add tests for the existing QuestionWidgets. #1426

heyjamesknight opened this issue Sep 6, 2017 · 4 comments · Fixed by #1485
Labels

Comments

@heyjamesknight
Copy link
Contributor

This is an intermediate step in preparation for #378, and should be completed before #1423 .

In order to make sure our refactors don't change things they shouldn't, I propose adding tests around Widget construction and updating.

@heyjamesknight
Copy link
Contributor Author

heyjamesknight commented Sep 7, 2017

We want to ensure that the Answer functionality is the same before and after our refactor coming in #1423 and #1422. This includes both the way getAnswer() and clearAnswer() work, as well as internal behavior (such as to a call to deleteMedia in this instance).

The first test was AlignedImageWidget as it is easily generalizable to the other "Binary Name Widgets", including:

  • AlignedImageWidget
  • AnnotateWidget
  • AudioWidget
  • DrawWidget
  • ImageWebViewWidget
  • ImageWidget
  • SignatureWidget
  • VideoWidget

The other Binary Widget implementations also share major functionality—hopefully we can provide a similarly generalizable test for them:

  • BarcodeWidget
  • BearingWidget
  • ExPrinterWidget
  • GeoPointWidget
  • GeoShapeWidget
  • GeoTraceWidget

The remaining Widgets share a bit less in common, but there should still be opportunities for grouping them and knocking them out together.

@heyjamesknight
Copy link
Contributor Author

Tests are coming along albeit slowly. The first three BNWs have tests at this point, and I've managed to generalize them so the remaining ones should hopefully go quicker.

@heyjamesknight
Copy link
Contributor Author

heyjamesknight commented Sep 14, 2017

Finished Widgets:

  • AlignedImageWidget
  • AnnotateWidget
  • AudioWidget
  • BarcodeWidget
  • BearingWidget
  • BooleanWidget
  • DateTimeWidget
  • DateWidget
  • DecimalWidget
  • DrawWidget
  • ExDecimalWidget
  • ExIntegerWidget
  • ExStringWidget
  • GeoPointWidget
  • GeoShapeWidget
  • GeoTraceWidget
  • GridMultiWidget
  • GridWidget
  • ImageWebViewWidget
  • ImageWidget
  • IntegerWidget
  • ItemsetWidget
  • ListMultiWidget
  • ListWidget
  • OSMWidget
  • RangeDecimalWidget
  • RangeIntegerWidget
  • SelectOneAutoAdvanceWidget
  • SelectOneSearchWidget
  • SelectOneWidget
  • SelectMultiWidget
  • SpinnerMultiWidget
  • SpinnerWidget
  • SignatureWidget
  • StringNumberWidget
  • StringWidget
  • TimeWidget
  • TriggerWidget
  • UrlWidget
  • VideoWidget

These Widgets don't provide answer functionality and will not be tested:

  • ExPrinterWidget
  • LabelWidget

@heyjamesknight
Copy link
Contributor Author

Just a few left, planning on wrapping them up tomorrow morning. Sorry for the delay, didn't have as much free time as I was hoping last week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants