({patternName}: {patternName: string})
| 2 | import React from 'react'; |
| 3 | |
| 4 | export function PatternTestingFAQ({patternName}: {patternName: string}) { |
| 5 | return ( |
| 6 | <> |
| 7 | <Disclosure isQuiet> |
| 8 | <DisclosureTitle> |
| 9 | When using the test utils, what if a certain interaction errors or doesn't seem to result |
| 10 | in the expected state? |
| 11 | </DisclosureTitle> |
| 12 | <DisclosurePanel> |
| 13 | In cases like this, first double check your test setup and make sure that your test is |
| 14 | rendering your {patternName} in its expected state before the test util interaction call. |
| 15 | If everything looks correct, you can always fall back to simulating interactions manually, |
| 16 | and using the test util to query your {patternName}'s state post interaction. |
| 17 | </DisclosurePanel> |
| 18 | </Disclosure> |
| 19 | <Disclosure isQuiet> |
| 20 | <DisclosureTitle> |
| 21 | The tester doesn't offer a specific interaction flow, what should I do? |
| 22 | </DisclosureTitle> |
| 23 | <DisclosurePanel> |
| 24 | Whenever the {patternName} tester queries its elements or triggers a user flow, it does so |
| 25 | against the current state of the {patternName}. Therefore the {patternName} tester can be |
| 26 | used alongside whatever simulated user flow you add. |
| 27 | </DisclosurePanel> |
| 28 | </Disclosure> |
| 29 | </> |
| 30 | ); |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected