1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Implement new unreachable state and fix broken string ref (#11748)

* Fix string ref issue

* Implement unreachable state

* Fix eslint failure

* Fix i18n

* Fix i18n again

* Write cypress test

* Write jest test

* Write more jest tests

* Update method name

* Use unstable prefix

* Always use prefix

This is never to going to be in the spec so always use the io.element
prefix

* Update tests

* Remove redundant code from cypress test

* Use unstable prefix

* Refactor code

* Remove supressOnHover prop

* Remove sub-text label

* Join lines

* Remove blank line

* Add jsdoc
This commit is contained in:
R Midhun Suresh
2023-11-07 15:44:30 +05:30
committed by GitHub
parent 6849afd9fc
commit 90419bdffd
9 changed files with 234 additions and 133 deletions

View File

@ -32,4 +32,17 @@ describe("<PresenceLabel/>", () => {
</DocumentFragment>
`);
});
it("should render 'Unreachable' for presence=unreachable", () => {
const { asFragment } = render(<PresenceLabel presenceState="io.element.unreachable" />);
expect(asFragment()).toMatchInlineSnapshot(`
<DocumentFragment>
<div
class="mx_PresenceLabel"
>
User's server unreachable
</div>
</DocumentFragment>
`);
});
});