You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-01 03:23:30 +03:00
Fix: Right panel keeps showing chat when unmaximizing widget. (#11697)
* Right panel chat closes when unmaximising widget * Basic right panel tests added * Accessible selectors used for new tests * Test added to check if chat exists in right panel --------- Co-authored-by: Manan Sadana <manan.sadana@cnhteam.onmicrosoft.com> Co-authored-by: Florian Duros <florianduros@element.io>
This commit is contained in:
@@ -129,4 +129,20 @@ describe("Widget Layout", () => {
|
||||
|
||||
cy.get('iframe[title="widget"]').invoke("height").should("be.greaterThan", 400);
|
||||
});
|
||||
it("open right panel with chat when maximizing widget", () => {
|
||||
cy.get('iframe[title="widget"]').invoke("height").should("be.lessThan", 250);
|
||||
cy.findByRole("button", { name: "Maximise" }).click();
|
||||
cy.get(".mx_RightPanel").within(() => {
|
||||
cy.get(".mx_BaseCard_header").should("contain", "Chat");
|
||||
});
|
||||
});
|
||||
it("close right panel with chat when unmaximizing widget", () => {
|
||||
cy.get('iframe[title="widget"]').invoke("height").should("be.lessThan", 250);
|
||||
cy.findByRole("button", { name: "Maximise" }).click();
|
||||
cy.get(".mx_RightPanel").within(() => {
|
||||
cy.get(".mx_BaseCard_header").should("contain", "Chat");
|
||||
});
|
||||
cy.findByRole("button", { name: "Un-maximise" }).click();
|
||||
cy.get(".mx_RightPanel").should("not.exist");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user