mirror of https://github.com/vector-im/riot-web
Update existing Cypress tests - use Cypress Testing Library (#10755)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>pull/28217/head
parent
58c942be45
commit
a81940b62a
|
@ -27,7 +27,7 @@ interface CryptoTestContext extends Mocha.Context {
|
|||
}
|
||||
|
||||
const openRoomInfo = () => {
|
||||
cy.get(".mx_RightPanel_roomSummaryButton").click();
|
||||
cy.findByRole("button", { name: "Room info" }).click();
|
||||
return cy.get(".mx_RightPanel");
|
||||
};
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ const handleVerificationRequest = (request: VerificationRequest): Chainable<Emoj
|
|||
const checkTimelineNarrow = (button = true) => {
|
||||
cy.viewport(800, 600); // SVGA
|
||||
cy.get(".mx_LeftPanel_minimized").should("exist"); // Wait until the left panel is minimized
|
||||
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Open the right panel to make the timeline narrow
|
||||
cy.findByRole("button", { name: "Room info" }).click(); // Open the right panel to make the timeline narrow
|
||||
cy.get(".mx_BaseCard").should("exist");
|
||||
|
||||
// Ensure the failure bar does not cover the timeline
|
||||
|
@ -74,7 +74,7 @@ const checkTimelineNarrow = (button = true) => {
|
|||
cy.get("[data-testid='decryption-failure-bar-button']:last-of-type").should("be.visible");
|
||||
}
|
||||
|
||||
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Close the right panel
|
||||
cy.findByRole("button", { name: "Room info" }).click(); // Close the right panel
|
||||
cy.get(".mx_BaseCard").should("not.exist");
|
||||
cy.viewport(1000, 660); // Reset to the default size
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ const getMemberTileByName = (name: string): Chainable<JQuery<HTMLElement>> => {
|
|||
|
||||
const viewRoomSummaryByName = (name: string): Chainable<JQuery<HTMLElement>> => {
|
||||
cy.viewRoomByName(name);
|
||||
cy.get(".mx_RightPanel_roomSummaryButton").click();
|
||||
cy.findByRole("button", { name: "Room info" }).click();
|
||||
return checkRoomSummaryCard(name);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue