Fix flaky jest tests #5977
Annotations
2 errors
Run tests:
test/unit-tests/components/structures/MatrixChat-test.tsx#L325
Unable to find an element with the text: We asked the browser to remember which homeserver you use to let you sign in, but unfortunately your browser has forgotten it. Go to the sign in page and try again.. 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.
Ignored nodes: comments, script, style
<div
aria-describedby="mx_Dialog_content"
aria-labelledby="mx_BaseDialog_title"
class="mx_ErrorDialog mx_Dialog_fixedWidth"
data-focus-lock-disabled="false"
role="dialog"
>
<div
class="mx_Dialog_header"
>
<h1
class="mx_Heading_h3 mx_Dialog_title"
id="mx_BaseDialog_title"
>
Missing session data
</h1>
</div>
<div
class="mx_Dialog_content"
id="mx_Dialog_content"
>
<p>
Some session data, including encrypted message keys, is missing. Sign out and sign in to fix this, restoring keys from backup.
</p>
<p>
Your browser likely removed this data when running low on disk space.
</p>
</div>
<div
class="mx_Dialog_buttons"
>
<span
class="mx_Dialog_buttons_row"
>
<button
class="mx_Dialog_primary"
data-testid="dialog-primary-button"
type="button"
>
Sign out
</button>
</span>
</div>
</div>
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at expectOIDCError (test/unit-tests/components/structures/MatrixChat-test.tsx:325:26)
at Object.<anonymous> (test/unit-tests/components/structures/MatrixChat-test.tsx:443:17)
|
Run tests
Process completed with exit code 1.
|
Loading