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

Cypress test: can't switch back to default homeserver #11130

Merged
merged 5 commits into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cypress/e2e/login/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,30 @@ describe("Login", () => {
// wait for the dialog to go away
cy.get(".mx_ServerPickerDialog").should("not.exist");

cy.get(".mx_Spinner").should("not.exist");
cy.get(".mx_ServerPicker_server").should("have.text", homeserver.baseUrl);

cy.findByRole("button", { name: "Edit" }).click();

// select the default server again
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great if the comment could be clear that this is here as a regression test, otherwise it just looks like an unnecessary extra step in the context of the the test name

cy.get(".mx_StyledRadioButton").first().click();
cy.findByRole("button", { name: "Continue" }).click();
cy.get(".mx_ServerPickerDialog").should("not.exist");
cy.get(".mx_Spinner").should("not.exist");
// name of default server
cy.get(".mx_ServerPicker_server").should("have.text", "server.invalid");

// switch back to the custom homeserver

cy.findByRole("button", { name: "Edit" }).click();
cy.findByRole("textbox", { name: "Other homeserver" }).type(homeserver.baseUrl);
cy.findByRole("button", { name: "Continue" }).click();
// wait for the dialog to go away
cy.get(".mx_ServerPickerDialog").should("not.exist");

cy.get(".mx_Spinner").should("not.exist");
cy.get(".mx_ServerPicker_server").should("have.text", homeserver.baseUrl);

cy.findByRole("textbox", { name: "Username", timeout: 15000 }).should("be.visible");
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/24688
//cy.percySnapshot("Login");
Expand Down
Loading