@@ -345,7 +345,8 @@ describe("Spotlight", () => {
|
||||
cy.spotlightFilter(Filter.People);
|
||||
cy.spotlightSearch().clear().type(bot2Name);
|
||||
cy.spotlightResults().should("have.length", 1);
|
||||
cy.spotlightResults().contains(bot2Name).click();
|
||||
cy.spotlightResults().eq(0).should("contain", bot2Name);
|
||||
cy.spotlightResults().eq(0).click();
|
||||
})
|
||||
.then(() => {
|
||||
cy.roomHeaderName().should("contain", bot2Name);
|
||||
@@ -360,7 +361,9 @@ describe("Spotlight", () => {
|
||||
cy.openSpotlightDialog().within(() => {
|
||||
cy.spotlightFilter(Filter.People);
|
||||
cy.spotlightSearch().clear().type(bot2Name);
|
||||
cy.spotlightResults().contains(bot2Name).click();
|
||||
cy.spotlightResults().should("have.length", 1);
|
||||
cy.spotlightResults().eq(0).should("contain", bot2Name);
|
||||
cy.spotlightResults().eq(0).click();
|
||||
});
|
||||
|
||||
// Send first message to actually start DM
|
||||
@@ -387,10 +390,11 @@ describe("Spotlight", () => {
|
||||
cy.spotlightFilter(Filter.People);
|
||||
cy.spotlightSearch().clear().type(bot1.getUserId());
|
||||
cy.wait(1000); // wait for the dialog code to settle
|
||||
cy.spotlightResults().should("have.length", 2);
|
||||
cy.contains(
|
||||
".mx_SpotlightDialog_section.mx_SpotlightDialog_results .mx_SpotlightDialog_option",
|
||||
groupDm.name,
|
||||
).should("exist");
|
||||
);
|
||||
});
|
||||
|
||||
// Search for ByteBot by id, should return group DM and user
|
||||
@@ -398,10 +402,11 @@ describe("Spotlight", () => {
|
||||
cy.spotlightFilter(Filter.People);
|
||||
cy.spotlightSearch().clear().type(bot2.getUserId());
|
||||
cy.wait(1000); // wait for the dialog code to settle
|
||||
cy.spotlightResults().should("have.length", 2);
|
||||
cy.contains(
|
||||
".mx_SpotlightDialog_section.mx_SpotlightDialog_results .mx_SpotlightDialog_option",
|
||||
groupDm.name,
|
||||
).should("exist");
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -431,7 +436,9 @@ describe("Spotlight", () => {
|
||||
.within(() => {
|
||||
cy.spotlightFilter(Filter.People);
|
||||
cy.spotlightSearch().clear().type(bot2Name);
|
||||
cy.spotlightResults().should("contain", bot2Name);
|
||||
cy.wait(3000); // wait for the dialog code to settle
|
||||
cy.spotlightResults().should("have.length", 1);
|
||||
cy.spotlightResults().eq(0).should("contain", bot2Name);
|
||||
cy.get(".mx_SpotlightDialog_startGroupChat").should("contain", "Start a group chat");
|
||||
cy.get(".mx_SpotlightDialog_startGroupChat").click();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user