forked from matrix-org/matrix-react-sdk
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Loading threads with server-side assistance ([\matrix-org#9356](matrix-org#9356)). Fixes element-hq/element-web#21807, element-hq/element-web#21799, element-hq/element-web#21911, element-hq/element-web#22141, element-hq/element-web#22157, element-hq/element-web#22641, element-hq/element-web#22501 element-hq/element-web#22438 and element-hq/element-web#21678. Contributed by @justjanne. * Make thread replies trigger a room list re-ordering ([\matrix-org#9510](matrix-org#9510)). Fixes element-hq/element-web#21700. * Device manager - add extra details to device security and renaming ([\matrix-org#9501](matrix-org#9501)). Contributed by @kerryarchibald. * Add plain text mode to the wysiwyg composer ([\matrix-org#9503](matrix-org#9503)). Contributed by @florianduros. * Sliding Sync: improve sort order, show subspace rooms, better tombstoned room handling ([\matrix-org#9484](matrix-org#9484)). * Device manager - add learn more popups to filtered sessions section ([\matrix-org#9497](matrix-org#9497)). Contributed by @kerryarchibald. * Show thread notification if thread timeline is closed ([\matrix-org#9495](matrix-org#9495)). Fixes element-hq/element-web#23589. * Add message editing to wysiwyg composer ([\matrix-org#9488](matrix-org#9488)). Contributed by @florianduros. * Device manager - confirm sign out of other sessions ([\matrix-org#9487](matrix-org#9487)). Contributed by @kerryarchibald. * Automatically request logs from other users in a call when submitting logs ([\matrix-org#9492](matrix-org#9492)). * Add thread notification with server assistance (MSC3773) ([\matrix-org#9400](matrix-org#9400)). Fixes element-hq/element-web#21114, element-hq/element-web#21413, element-hq/element-web#21416, element-hq/element-web#21433, element-hq/element-web#21481, element-hq/element-web#21798, element-hq/element-web#21823 element-hq/element-web#23192 and element-hq/element-web#21765. * Support for login + E2EE set up with QR ([\matrix-org#9403](matrix-org#9403)). Contributed by @hughns. * Allow pressing Enter to send messages in new composer ([\matrix-org#9451](matrix-org#9451)). Contributed by @andybalaam. * Fix regressions around media uploads failing and causing soft crashes ([\matrix-org#9549](matrix-org#9549)). Fixes matrix-org/element-web-rageshakes#16831, matrix-org/element-web-rageshakes#16824 matrix-org/element-web-rageshakes#16810 and element-hq/element-web#23641. * Fix /myroomavatar slash command ([\matrix-org#9536](matrix-org#9536)). Fixes matrix-org/synapse#14321. * Fix NotificationBadge unsent color ([\matrix-org#9522](matrix-org#9522)). Fixes element-hq/element-web#23646. * Fix room list sorted by recent on app startup ([\matrix-org#9515](matrix-org#9515)). Fixes element-hq/element-web#23635. * Reset custom power selector when blurred on empty ([\matrix-org#9508](matrix-org#9508)). Fixes element-hq/element-web#23481. * Reinstate timeline/redaction callbacks when updating notification state ([\matrix-org#9494](matrix-org#9494)). Fixes element-hq/element-web#23554. * Only render NotificationBadge when needed ([\matrix-org#9493](matrix-org#9493)). Fixes element-hq/element-web#23584. * Fix embedded Element Call screen sharing ([\matrix-org#9485](matrix-org#9485)). Fixes element-hq/element-web#23571. * Send Content-Type: application/json header for integration manager /register API ([\matrix-org#9490](matrix-org#9490)). Fixes element-hq/element-web#23580. * Fix joining calls without audio or video inputs ([\matrix-org#9486](matrix-org#9486)). Fixes element-hq/element-web#23511. * Ensure spaces in the spotlight dialog have rounded square avatars ([\matrix-org#9480](matrix-org#9480)). Fixes element-hq/element-web#23515. * Only show mini avatar uploader in room intro when no avatar yet exists ([\matrix-org#9479](matrix-org#9479)). Fixes element-hq/element-web#23552. * Fix threads fallback incorrectly targets root event ([\matrix-org#9229](matrix-org#9229)). Fixes element-hq/element-web#23147. * Align video call icon with banner text ([\matrix-org#9460](matrix-org#9460)). * Set relations helper when creating event tile context menu ([\matrix-org#9253](matrix-org#9253)). Fixes element-hq/element-web#22018. * Device manager - put client/browser device metadata in correct section ([\matrix-org#9447](matrix-org#9447)). Contributed by @kerryarchibald. * Update the room unread notification counter when the server changes the value without any related read receipt ([\matrix-org#9438](matrix-org#9438)).
- Loading branch information
Showing
346 changed files
with
13,406 additions
and
4,572 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
14 | ||
16 |
This file contains 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 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 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,155 @@ | ||
/* | ||
Copyright 2022 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 { SynapseInstance } from "../../plugins/synapsedocker"; | ||
import { SettingLevel } from "../../../src/settings/SettingLevel"; | ||
|
||
describe("Composer", () => { | ||
let synapse: SynapseInstance; | ||
|
||
beforeEach(() => { | ||
cy.startSynapse("default").then(data => { | ||
synapse = data; | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.stopSynapse(synapse); | ||
}); | ||
|
||
describe("CIDER", () => { | ||
beforeEach(() => { | ||
cy.initTestUser(synapse, "Janet").then(() => { | ||
cy.createRoom({ name: "Composing Room" }); | ||
}); | ||
cy.viewRoomByName("Composing Room"); | ||
}); | ||
|
||
it("sends a message when you click send or press Enter", () => { | ||
// Type a message | ||
cy.get('div[contenteditable=true]').type('my message 0'); | ||
// It has not been sent yet | ||
cy.contains('.mx_EventTile_body', 'my message 0').should('not.exist'); | ||
|
||
// Click send | ||
cy.get('div[aria-label="Send message"]').click(); | ||
// It has been sent | ||
cy.contains('.mx_EventTile_body', 'my message 0'); | ||
|
||
// Type another and press Enter afterwards | ||
cy.get('div[contenteditable=true]').type('my message 1{enter}'); | ||
// It was sent | ||
cy.contains('.mx_EventTile_body', 'my message 1'); | ||
}); | ||
|
||
it("can write formatted text", () => { | ||
cy.get('div[contenteditable=true]').type('my bold{ctrl+b} message'); | ||
cy.get('div[aria-label="Send message"]').click(); | ||
// Note: both "bold" and "message" are bold, which is probably surprising | ||
cy.contains('.mx_EventTile_body strong', 'bold message'); | ||
}); | ||
|
||
it("should allow user to input emoji via graphical picker", () => { | ||
cy.getComposer(false).within(() => { | ||
cy.get('[aria-label="Emoji"]').click(); | ||
}); | ||
|
||
cy.get('[data-testid="mx_EmojiPicker"]').within(() => { | ||
cy.contains(".mx_EmojiPicker_item", "😇").click(); | ||
}); | ||
|
||
cy.get(".mx_ContextualMenu_background").click(); // Close emoji picker | ||
cy.get('div[contenteditable=true]').type("{enter}"); // Send message | ||
|
||
cy.contains(".mx_EventTile_body", "😇"); | ||
}); | ||
|
||
describe("when Ctrl+Enter is required to send", () => { | ||
beforeEach(() => { | ||
cy.setSettingValue("MessageComposerInput.ctrlEnterToSend", null, SettingLevel.ACCOUNT, true); | ||
}); | ||
|
||
it("only sends when you press Ctrl+Enter", () => { | ||
// Type a message and press Enter | ||
cy.get('div[contenteditable=true]').type('my message 3{enter}'); | ||
// It has not been sent yet | ||
cy.contains('.mx_EventTile_body', 'my message 3').should('not.exist'); | ||
|
||
// Press Ctrl+Enter | ||
cy.get('div[contenteditable=true]').type('{ctrl+enter}'); | ||
// It was sent | ||
cy.contains('.mx_EventTile_body', 'my message 3'); | ||
}); | ||
}); | ||
}); | ||
|
||
describe("WYSIWYG", () => { | ||
beforeEach(() => { | ||
cy.enableLabsFeature("feature_wysiwyg_composer"); | ||
cy.initTestUser(synapse, "Janet").then(() => { | ||
cy.createRoom({ name: "Composing Room" }); | ||
}); | ||
cy.viewRoomByName("Composing Room"); | ||
}); | ||
|
||
it("sends a message when you click send or press Enter", () => { | ||
// Type a message | ||
cy.get('div[contenteditable=true]').type('my message 0'); | ||
// It has not been sent yet | ||
cy.contains('.mx_EventTile_body', 'my message 0').should('not.exist'); | ||
|
||
// Click send | ||
cy.get('div[aria-label="Send message"]').click(); | ||
// It has been sent | ||
cy.contains('.mx_EventTile_body', 'my message 0'); | ||
|
||
// Type another | ||
cy.get('div[contenteditable=true]').type('my message 1'); | ||
// Press enter. Would be nice to just use {enter} but we can't because Cypress | ||
// does not trigger an insertParagraph when you do that. | ||
cy.get('div[contenteditable=true]').trigger('input', { inputType: "insertParagraph" }); | ||
// It was sent | ||
cy.contains('.mx_EventTile_body', 'my message 1'); | ||
}); | ||
|
||
it("can write formatted text", () => { | ||
cy.get('div[contenteditable=true]').type('my {ctrl+b}bold{ctrl+b} message'); | ||
cy.get('div[aria-label="Send message"]').click(); | ||
cy.contains('.mx_EventTile_body strong', 'bold'); | ||
}); | ||
|
||
describe("when Ctrl+Enter is required to send", () => { | ||
beforeEach(() => { | ||
cy.setSettingValue("MessageComposerInput.ctrlEnterToSend", null, SettingLevel.ACCOUNT, true); | ||
}); | ||
|
||
it("only sends when you press Ctrl+Enter", () => { | ||
// Type a message and press Enter | ||
cy.get('div[contenteditable=true]').type('my message 3'); | ||
cy.get('div[contenteditable=true]').trigger('input', { inputType: "insertParagraph" }); | ||
// It has not been sent yet | ||
cy.contains('.mx_EventTile_body', 'my message 3').should('not.exist'); | ||
|
||
// Press Ctrl+Enter | ||
cy.get('div[contenteditable=true]').type('{ctrl+enter}'); | ||
// It was sent | ||
cy.contains('.mx_EventTile_body', 'my message 3'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains 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 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 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 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.