cliff-effects icon indicating copy to clipboard operation
cliff-effects copied to clipboard

Write tests for prompt-related components

Open knod opened this issue 7 years ago • 3 comments

It's just really annoying to keep trying to test the prompts every time there's a change.

There are two prompts. One is the feedback form, always triggered by the feedback prompt. It's always the same. The other is the feedback prompt, which is triggered by almost everything else. The text in the feedback prompt and the callbacks when its buttons are pressed can change, though, depending on what triggered it to show.

  • [ ] Ensure listeners trigger prompt that asks user for feedback. Listeners:
    • [ ] Error
    • [ ] Feedback button
    • [ ] Reset client fixed button
    • [ ] Reset client 'Predictions' button (make sure same as other reset button)
    • [ ] React click to navigate to Home page
  • [ ] Correct functionality for prompt asking users for feedback (text and buttons) after triggered by:
    • [ ] React click to navigate to Home page: Leave, Stay, Feedback
    • [ ] Error: Reset, Stay, Feedback
    • [ ] Reset client fixed button: Reset, Stay, Feedback
    • [ ] Reset client 'Predictions' button (make sure same as other reset button): Reset, Stay, Feedback
  • [ ] Feedback prompt
    • [ ] Triggered by feedback button
    • [ ] Submits feedback
    • [ ] Cancel shows prompt that triggered it, if there was one, or goes back to client otherwise
  • [ ] Listeners trigger browser prompts:
    • [ ] Browser leave
    • [ ] Browser reload

knod avatar Jun 25 '18 22:06 knod

Regarding "Listeners trigger browser prompts":

  1. will trigger when any fields changed at all (including back to default after changed)
  2. will not trigger if no field changed

I'm curious how we can test the browser prompt because it's handled by the browser (Chrome in my case).

Butterwell avatar Jul 08 '18 02:07 Butterwell

Hmm, I'm not sure exactly what you mean. Maybe do the others for now and we can discuss more in-depth on Slack. Does that work?

knod avatar Jul 08 '18 17:07 knod

Absolutely. I'll go ahead and do the others and come back to it (on Slack).

Butterwell avatar Jul 09 '18 14:07 Butterwell