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.
* Device manager - New device tile info design ([\matrix-org#9122](matrix-org#9122)). Contributed by @kerryarchibald. * Device manager generic settings subsection component ([\matrix-org#9147](matrix-org#9147)). Contributed by @kerryarchibald. * Migrate the hidden read receipts flag to new "send read receipts" option ([\matrix-org#9141](matrix-org#9141)). * Live location sharing - share location at most every 5 seconds ([\matrix-org#9148](matrix-org#9148)). Contributed by @kerryarchibald. * Increase max length of voice messages to 15m ([\matrix-org#9133](matrix-org#9133)). Fixes element-hq/element-web#18620. * Move pin drop out of labs ([\matrix-org#9135](matrix-org#9135)). * Start DM on first message ([\matrix-org#8612](matrix-org#8612)). Fixes element-hq/element-web#14736. * Remove "Add Space" button from RoomListHeader when user cannot create spaces ([\matrix-org#9129](matrix-org#9129)). * The Welcome Home Screen: Dedicated Download Apps Dialog ([\matrix-org#9120](matrix-org#9120)). Fixes element-hq/element-web#22921. Contributed by @justjanne. * The Welcome Home Screen: "Submit Feedback" pane ([\matrix-org#9090](matrix-org#9090)). Fixes element-hq/element-web#22918. Contributed by @justjanne. * New User Onboarding Task List ([\matrix-org#9083](matrix-org#9083)). Fixes element-hq/element-web#22919. Contributed by @justjanne. * Add support for disabling spell checking ([\matrix-org#8604](matrix-org#8604)). Fixes element-hq/element-web#21901. * Live location share - leave maximised map open when beacons expire ([\matrix-org#9098](matrix-org#9098)). Contributed by @kerryarchibald. * Some slash-commands (`/myroomnick`) have temporarily been disabled before the first message in a DM is sent. ([\matrix-org#9193](matrix-org#9193)). * Use stable reference for active tab in tabbedView ([\matrix-org#9145](matrix-org#9145)). Contributed by @kerryarchibald. * Fix pillification sometimes doubling up ([\matrix-org#9152](matrix-org#9152)). Fixes element-hq/element-web#23036. * Fix composer padding ([\matrix-org#9137](matrix-org#9137)). Fixes element-hq/element-web#22992. * Fix highlights not being applied to plaintext messages ([\matrix-org#9126](matrix-org#9126)). Fixes element-hq/element-web#22787. * Fix dismissing edit composer when change was undone ([\matrix-org#9109](matrix-org#9109)). Fixes element-hq/element-web#22932. * 1-to-1 DM rooms with bots now act like DM rooms instead of multi-user-rooms before ([\matrix-org#9124](matrix-org#9124)). Fixes element-hq/element-web#22894. * Apply inline start padding to selected lines on modern layout only ([\matrix-org#9006](matrix-org#9006)). Fixes element-hq/element-web#22768. Contributed by @luixxiul. * Peek into world-readable rooms from spotlight ([\matrix-org#9115](matrix-org#9115)). Fixes element-hq/element-web#22862. * Use default styling on nested numbered lists due to MD being sensitive ([\matrix-org#9110](matrix-org#9110)). Fixes element-hq/element-web#22935. * Fix replying using chat effect commands ([\matrix-org#9101](matrix-org#9101)). Fixes element-hq/element-web#22824. * The first message in a DM can no longer be a sticker. This has been changed to avoid issues with the integration manager. ([\matrix-org#9180](matrix-org#9180)).
- Loading branch information
Showing
514 changed files
with
7,535 additions
and
6,857 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>matrix-org/renovate-config-element-web" | ||
] | ||
} |
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
File renamed without changes.
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,70 @@ | ||
/* | ||
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 { MessageEvent } from "matrix-events-sdk"; | ||
|
||
import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests"; | ||
import type { EventType } from "matrix-js-sdk/src/@types/event"; | ||
import { SynapseInstance } from "../../plugins/synapsedocker"; | ||
import Chainable = Cypress.Chainable; | ||
|
||
const sendEvent = (roomId: string): Chainable<ISendEventResponse> => { | ||
return cy.sendEvent( | ||
roomId, | ||
null, | ||
"m.room.message" as EventType, | ||
MessageEvent.from("Message").serialize().content, | ||
); | ||
}; | ||
|
||
describe("Editing", () => { | ||
let synapse: SynapseInstance; | ||
|
||
beforeEach(() => { | ||
cy.startSynapse("default").then(data => { | ||
synapse = data; | ||
cy.initTestUser(synapse, "Edith").then(() => { | ||
cy.injectAxe(); | ||
return cy.createRoom({ name: "Test room" }).as("roomId"); | ||
}); | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.stopSynapse(synapse); | ||
}); | ||
|
||
it("should close the composer when clicking save after making a change and undoing it", () => { | ||
cy.get<string>("@roomId").then(roomId => { | ||
sendEvent(roomId); | ||
cy.visit("/#/room/" + roomId); | ||
}); | ||
|
||
// Edit message | ||
cy.contains(".mx_RoomView_body .mx_EventTile .mx_EventTile_line", "Message").within(() => { | ||
cy.get('[aria-label="Edit"]').click({ force: true }); // Cypress has no ability to hover | ||
cy.checkA11y(); | ||
cy.get(".mx_BasicMessageComposer_input").type("Foo{backspace}{backspace}{backspace}{enter}"); | ||
cy.checkA11y(); | ||
}); | ||
cy.get(".mx_RoomView_body .mx_EventTile").contains(".mx_EventTile[data-scroll-tokens]", "Message"); | ||
|
||
// Assert that the edit composer has gone away | ||
cy.get(".mx_EditMessageComposer").should("not.exist"); | ||
}); | ||
}); |
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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,90 @@ | ||
/* | ||
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"; | ||
|
||
function seedLabs(synapse: SynapseInstance, labsVal: boolean | null): void { | ||
cy.initTestUser(synapse, "Sally", () => { | ||
// seed labs flag | ||
cy.window({ log: false }).then(win => { | ||
if (typeof labsVal === "boolean") { | ||
// stringify boolean | ||
win.localStorage.setItem("mx_labs_feature_feature_hidden_read_receipts", `${labsVal}`); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function testForVal(settingVal: boolean | null): void { | ||
const testRoomName = "READ RECEIPTS"; | ||
cy.createRoom({ name: testRoomName }).as("roomId"); | ||
cy.all([cy.get<string>("@roomId")]).then(() => { | ||
cy.viewRoomByName(testRoomName).then(() => { | ||
// if we can see the room, then sync is working for us. It's time to see if the | ||
// migration even ran. | ||
|
||
cy.getSettingValue("sendReadReceipts", null, true).should("satisfy", (val) => { | ||
if (typeof settingVal === "boolean") { | ||
return val === settingVal; | ||
} else { | ||
return !val; // falsy - we don't actually care if it's undefined, null, or a literal false | ||
} | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
describe("Hidden Read Receipts Setting Migration", () => { | ||
// We run this as a full-blown end-to-end test to ensure it works in an integration | ||
// sense. If we unit tested it, we'd be testing that the code works but not that the | ||
// migration actually runs. | ||
// | ||
// Here, we get to test that not only the code works but also that it gets run. Most | ||
// of our interactions are with the JS console as we're honestly just checking that | ||
// things got set correctly. | ||
// | ||
// For a security-sensitive feature like hidden read receipts, it's absolutely vital | ||
// that we migrate the setting appropriately. | ||
|
||
let synapse: SynapseInstance; | ||
|
||
beforeEach(() => { | ||
cy.startSynapse("default").then(data => { | ||
synapse = data; | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.stopSynapse(synapse); | ||
}); | ||
|
||
it('should not migrate the lack of a labs flag', () => { | ||
seedLabs(synapse, null); | ||
testForVal(null); | ||
}); | ||
|
||
it('should migrate labsHiddenRR=false as sendRR=true', () => { | ||
seedLabs(synapse, false); | ||
testForVal(true); | ||
}); | ||
|
||
it('should migrate labsHiddenRR=true as sendRR=false', () => { | ||
seedLabs(synapse, true); | ||
testForVal(false); | ||
}); | ||
}); |
Oops, something went wrong.