Move EventTile to shared components - #4a (#34469)
* Add EventTile root properties to view model * Move render-related event reads into the vm * Remove duplicate root derivation in UnwrappedEventTile * Move data-has-reply derivation into EventTileViewModel * Move getEventDisplayInfo() and dependencies into EventTileViewModel * Add tests for improved coverage * Cleanup and comments * Fix: Replacement events have a fallback tile but must not show their own reply chain * Combine dependency and prop updates into one atomic VM update * Remove property which was never read and fix oxfmt issue
This commit is contained in:
@@ -292,6 +292,15 @@ describe("EventTile", () => {
|
||||
expect(getTile(container)).toContainElement(getLine(container));
|
||||
});
|
||||
|
||||
it("preserves the existing root and line markup", () => {
|
||||
const { container } = getComponent();
|
||||
const tile = getTile(container);
|
||||
|
||||
expect(tile.tagName).toBe("LI");
|
||||
expect(tile).toContainElement(getLine(container));
|
||||
expect(getLine(container)).toHaveClass("mx_EventTile_line");
|
||||
});
|
||||
|
||||
it("does not expose a scroll token for local echo events", () => {
|
||||
const localEcho = makeOwnMessage();
|
||||
localEcho.setStatus(EventStatus.SENDING);
|
||||
|
||||
Reference in New Issue
Block a user