This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 805
Implement new unreachable state and fix broken string ref #11748
Merged
MidhunSureshR
merged 23 commits into
develop
from
midhun/implement-unreliable-presence-indicator
Nov 7, 2023
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d1c6078
Fix string ref issue
MidhunSureshR 468d9d2
Implement unreachable state
MidhunSureshR 6042ead
Fix eslint failure
MidhunSureshR 0ea02e8
Fix i18n
MidhunSureshR 668815f
Fix i18n again
MidhunSureshR bd4bce7
Write cypress test
MidhunSureshR 381cfd7
Write jest test
MidhunSureshR 9bd9227
Merge branch 'develop' into midhun/implement-unreliable-presence-indi…
MidhunSureshR 6e5c8fb
Write more jest tests
MidhunSureshR 8ebf43f
Merge branch 'develop' into midhun/implement-unreliable-presence-indi…
MidhunSureshR 821ba6d
Update method name
MidhunSureshR 6e13d16
Use unstable prefix
MidhunSureshR e60bee9
Always use prefix
MidhunSureshR 7887d4d
Update tests
MidhunSureshR d7d0ae5
Remove redundant code from cypress test
MidhunSureshR 8f1d262
Use unstable prefix
MidhunSureshR d0de9d7
Refactor code
MidhunSureshR 6928aca
Remove supressOnHover prop
MidhunSureshR ce55471
Remove sub-text label
MidhunSureshR b02a99b
Join lines
MidhunSureshR 14086c6
Remove blank line
MidhunSureshR 0218b00
Merge branch 'develop' into midhun/implement-unreliable-presence-indi…
MidhunSureshR 4f89767
Add jsdoc
MidhunSureshR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| /* | ||
| Copyright 2023 The Matrix.org Foundation C.I.C. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| /// <reference types="cypress" /> | ||
| import { HomeserverInstance } from "../../plugins/utils/homeserver"; | ||
|
|
||
| describe("Presence tests", () => { | ||
| let homeserver: HomeserverInstance; | ||
|
|
||
| beforeEach(() => { | ||
| cy.startHomeserver("default").then((data) => { | ||
| homeserver = data; | ||
| }); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| cy.stopHomeserver(homeserver); | ||
| }); | ||
|
|
||
| it("renders unreachable presence state correctly", () => { | ||
| cy.initTestUser(homeserver, "Janet"); | ||
| cy.getBot(homeserver, { displayName: "Bob" }).then((bob) => { | ||
| cy.intercept("GET", "**/sync*", (req) => { | ||
| req.continue((res) => { | ||
| res.body.presence = { | ||
| events: [ | ||
| { | ||
| type: "m.presence", | ||
| sender: bob.getUserId(), | ||
| content: { | ||
| presence: "io.element.unreachable", | ||
| currently_active: false, | ||
| }, | ||
| }, | ||
| ], | ||
| }; | ||
| }); | ||
| }); | ||
| cy.createRoom({ name: "My Room", invite: [bob.getUserId()] }).then((roomId) => { | ||
| cy.viewRoomById(roomId); | ||
| }); | ||
| cy.findByRole("button", { name: "Room info" }).click(); | ||
| cy.get(".mx_RightPanel").within(() => { | ||
| cy.contains("People").click(); | ||
| }); | ||
| cy.get(".mx_EntityTile_unreachable") | ||
| .should("contain.text", "Bob") | ||
| .should("contain.text", "User's server unreachable"); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.