Display redacted body on ThreadView in the same way as normal messages (#9016)
This commit is contained in:
parent
6fa00a20b0
commit
f60f7a19af
3 changed files with 238 additions and 61 deletions
|
@ -18,6 +18,8 @@ limitations under the License.
|
|||
|
||||
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
||||
import { MatrixClient } from "../../global";
|
||||
import { SettingLevel } from "../../../src/settings/SettingLevel";
|
||||
import { Layout } from "../../../src/settings/enums/Layout";
|
||||
import Chainable = Cypress.Chainable;
|
||||
|
||||
const hidePercyCSS = ".mx_MessageTimestamp, .mx_RoomView_myReadMarker { visibility: hidden !important; }";
|
||||
|
@ -313,6 +315,18 @@ describe("Polls", () => {
|
|||
// and thread view
|
||||
cy.get(".mx_ThreadView .mx_MPollBody_totalVotes").should("contain", "2 votes cast");
|
||||
|
||||
// Take snapshots of poll on ThreadView
|
||||
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.Bubble);
|
||||
cy.get(".mx_ThreadView .mx_EventTile[data-layout='bubble']").should("be.visible");
|
||||
cy.get(".mx_ThreadView").percySnapshotElement("ThreadView with a poll on bubble layout", {
|
||||
percyCSS: hidePercyCSS,
|
||||
});
|
||||
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.Group);
|
||||
cy.get(".mx_ThreadView .mx_EventTile[data-layout='group']").should("be.visible");
|
||||
cy.get(".mx_ThreadView").percySnapshotElement("ThreadView with a poll on group layout", {
|
||||
percyCSS: hidePercyCSS,
|
||||
});
|
||||
|
||||
cy.get(".mx_RoomView_body").within(() => {
|
||||
// vote 'Maybe' in the main timeline poll
|
||||
getPollOption(pollId, pollParams.options[2]).click("topLeft");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue