You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	Reduce flakiness of spotlight tests (#9310)
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							772df30212
						
					
				
				
					commit
					a704a2fbb7
				
			@@ -125,7 +125,7 @@ Cypress.Commands.add("startDM", (name: string) => {
 | 
				
			|||||||
        .should("have.focus")
 | 
					        .should("have.focus")
 | 
				
			||||||
        .type("Hey!{enter}");
 | 
					        .type("Hey!{enter}");
 | 
				
			||||||
    cy.contains(".mx_EventTile_body", "Hey!");
 | 
					    cy.contains(".mx_EventTile_body", "Hey!");
 | 
				
			||||||
    cy.get(".mx_RoomSublist[aria-label=People]").should("contain", name);
 | 
					    cy.contains(".mx_RoomSublist[aria-label=People]", name);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe("Spotlight", () => {
 | 
					describe("Spotlight", () => {
 | 
				
			||||||
@@ -365,7 +365,10 @@ describe("Spotlight", () => {
 | 
				
			|||||||
                    cy.spotlightSearch().clear().type(bot1.getUserId());
 | 
					                    cy.spotlightSearch().clear().type(bot1.getUserId());
 | 
				
			||||||
                    cy.wait(1000); // wait for the dialog code to settle
 | 
					                    cy.wait(1000); // wait for the dialog code to settle
 | 
				
			||||||
                    cy.spotlightResults().should("have.length", 2);
 | 
					                    cy.spotlightResults().should("have.length", 2);
 | 
				
			||||||
                    cy.spotlightResults().eq(0).should("contain", groupDm.name);
 | 
					                    cy.contains(
 | 
				
			||||||
 | 
					                        ".mx_SpotlightDialog_section.mx_SpotlightDialog_results .mx_SpotlightDialog_option",
 | 
				
			||||||
 | 
					                        groupDm.name,
 | 
				
			||||||
 | 
					                    );
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // Search for ByteBot by id, should return group DM and user
 | 
					                // Search for ByteBot by id, should return group DM and user
 | 
				
			||||||
@@ -374,7 +377,10 @@ describe("Spotlight", () => {
 | 
				
			|||||||
                    cy.spotlightSearch().clear().type(bot2.getUserId());
 | 
					                    cy.spotlightSearch().clear().type(bot2.getUserId());
 | 
				
			||||||
                    cy.wait(1000); // wait for the dialog code to settle
 | 
					                    cy.wait(1000); // wait for the dialog code to settle
 | 
				
			||||||
                    cy.spotlightResults().should("have.length", 2);
 | 
					                    cy.spotlightResults().should("have.length", 2);
 | 
				
			||||||
                    cy.spotlightResults().eq(0).should("contain", groupDm.name);
 | 
					                    cy.contains(
 | 
				
			||||||
 | 
					                        ".mx_SpotlightDialog_section.mx_SpotlightDialog_results .mx_SpotlightDialog_option",
 | 
				
			||||||
 | 
					                        groupDm.name,
 | 
				
			||||||
 | 
					                    );
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user