Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Make Spaces cypress tests less flaky (#9138)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Aug 8, 2022
1 parent ed67aec commit e08b11b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cypress/e2e/spaces/spaces.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ describe("Spaces", () => {
cy.get(".mx_AccessibleButton").contains("Go to my first room").click();

// Assert rooms exist in the room list
cy.get(".mx_RoomTile").contains("General").should("exist");
cy.get(".mx_RoomTile").contains("Random").should("exist");
cy.get(".mx_RoomTile").contains("Jokes").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "General").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "Random").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "Jokes").should("exist");
});

it("should allow user to create private space", () => {
Expand All @@ -128,14 +128,14 @@ describe("Spaces", () => {
cy.get(".mx_AccessibleButton").contains("Skip for now").click();

// Assert rooms exist in the room list
cy.get(".mx_RoomTile").contains("General").should("exist");
cy.get(".mx_RoomTile").contains("Random").should("exist");
cy.get(".mx_RoomTile").contains("Projects").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "General").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "Random").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "Projects").should("exist");

// Assert rooms exist in the space explorer
cy.get(".mx_SpaceHierarchy_roomTile").contains("General").should("exist");
cy.get(".mx_SpaceHierarchy_roomTile").contains("Random").should("exist");
cy.get(".mx_SpaceHierarchy_roomTile").contains("Projects").should("exist");
cy.get(".mx_SpaceHierarchy_list").contains(".mx_SpaceHierarchy_roomTile", "General").should("exist");
cy.get(".mx_SpaceHierarchy_list").contains(".mx_SpaceHierarchy_roomTile", "Random").should("exist");
cy.get(".mx_SpaceHierarchy_list").contains(".mx_SpaceHierarchy_roomTile", "Projects").should("exist");
});

it("should allow user to create just-me space", () => {
Expand All @@ -157,8 +157,8 @@ describe("Spaces", () => {
cy.get(".mx_AddExistingToSpace_entry").click();
cy.get(".mx_AccessibleButton").contains("Add").click();

cy.get(".mx_RoomTile").contains("Sample Room").should("exist");
cy.get(".mx_SpaceHierarchy_roomTile").contains("Sample Room").should("exist");
cy.get(".mx_RoomList").contains(".mx_RoomTile", "Sample Room").should("exist");
cy.get(".mx_SpaceHierarchy_list").contains(".mx_SpaceHierarchy_roomTile", "Sample Room").should("exist");
});

it("should allow user to invite another to a space", () => {
Expand Down Expand Up @@ -233,8 +233,8 @@ describe("Spaces", () => {
cy.viewSpaceHomeByName(spaceName);
});
cy.get(".mx_SpaceRoomView .mx_SpaceHierarchy_list").within(() => {
cy.get(".mx_SpaceHierarchy_roomTile").contains("Music").should("exist");
cy.get(".mx_SpaceHierarchy_roomTile").contains("Gaming").should("exist");
cy.contains(".mx_SpaceHierarchy_roomTile", "Music").should("exist");
cy.contains(".mx_SpaceHierarchy_roomTile", "Gaming").should("exist");
});
});
});

0 comments on commit e08b11b

Please sign in to comment.