You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test does not actually assert anything: <FileAnnotationList /> file path representation has both canonical file path and file path adjusted to OS & allen mount point.
Demonstration
Apply the following patch to search for some nonsense text in the rendered output. The test still passes, though it should fail.
The test could properly assert if written as follows. With this rewrite, the await findByText is not captured by the anonymous function async (cellText) => { and instead blocks test execution until it succeeds.
Running this modified test produces this error: Unable to find an element with the text: File Path (Canonical). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
The text was updated successfully, but these errors were encountered:
1. The test asserts nothing
The following test does not actually assert anything:
<FileAnnotationList /> file path representation has both canonical file path and file path adjusted to OS & allen mount point
.Demonstration
Apply the following patch to search for some nonsense text in the rendered output. The test still passes, though it should fail.
Root cause
In the following snippet, where an assertion is supposed to happen, instead 4 promises are created, but their resolution is never checked.
2. The test would fail if it did assert
The test could properly assert if written as follows. With this rewrite, the
await findByText
is not captured by the anonymous functionasync (cellText) => {
and instead blocks test execution until it succeeds.Running this modified test produces this error:
Unable to find an element with the text: File Path (Canonical). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
The text was updated successfully, but these errors were encountered: