1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-06 10:22:45 +03:00

Rename ReplyThread to ReplyChain to avoid confusion with m.thread

This commit is contained in:
Germain Souquet
2021-10-15 17:42:44 +01:00
parent 4fb0d021ae
commit 5a7c0d87b6
15 changed files with 77 additions and 77 deletions

View File

@@ -142,7 +142,7 @@ describe("ForwardDialog", () => {
});
const wrapper = await mountForwardDialog(replyMessage);
expect(wrapper.find("ReplyThread")).toBeTruthy();
expect(wrapper.find("ReplyChain")).toBeTruthy();
});
it("disables buttons for rooms without send permissions", async () => {

View File

@@ -1,8 +1,8 @@
import "../../../skinned-sdk";
import * as testUtils from '../../../test-utils';
import ReplyThread from '../../../../src/components/views/elements/ReplyThread';
import ReplyChain from '../../../../src/components/views/elements/ReplyChain';
describe("ReplyThread", () => {
describe("ReplyChain", () => {
describe('getParentEventId', () => {
it('retrieves relation reply from unedited event', () => {
const originalEventWithRelation = testUtils.mkEvent({
@@ -21,7 +21,7 @@ describe("ReplyThread", () => {
room: "room_id",
});
expect(ReplyThread.getParentEventId(originalEventWithRelation))
expect(ReplyChain.getParentEventId(originalEventWithRelation))
.toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og');
});
@@ -65,7 +65,7 @@ describe("ReplyThread", () => {
originalEventWithRelation.makeReplaced(editEvent);
// The relation should be pulled from the original event
expect(ReplyThread.getParentEventId(originalEventWithRelation))
expect(ReplyChain.getParentEventId(originalEventWithRelation))
.toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og');
});
@@ -109,7 +109,7 @@ describe("ReplyThread", () => {
originalEvent.makeReplaced(editEvent);
// The relation should be pulled from the edit event
expect(ReplyThread.getParentEventId(originalEvent))
expect(ReplyChain.getParentEventId(originalEvent))
.toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og');
});
@@ -158,7 +158,7 @@ describe("ReplyThread", () => {
originalEventWithRelation.makeReplaced(editEvent);
// The relation should be pulled from the edit event
expect(ReplyThread.getParentEventId(originalEventWithRelation)).toStrictEqual('$999');
expect(ReplyChain.getParentEventId(originalEventWithRelation)).toStrictEqual('$999');
});
it('able to clear relation reply from original event by providing empty relation field', () => {
@@ -203,7 +203,7 @@ describe("ReplyThread", () => {
originalEventWithRelation.makeReplaced(editEvent);
// The relation should be pulled from the edit event
expect(ReplyThread.getParentEventId(originalEventWithRelation)).toStrictEqual(undefined);
expect(ReplyChain.getParentEventId(originalEventWithRelation)).toStrictEqual(undefined);
});
});
});