Add intercept of config.json
(#10908)
* Add intercept of `config.json` To help make sure that we run our tests against a known config, rather than accidentally making requests to `matrix.org`. * Remove now-redundant stubs of matrix.org files Now that we intercept config.json, all this stuff is redundant. * Reinstate fixture which is actually used Turns out this is used after all * Add a `map_style_url` * disable failing axe check
This commit is contained in:
parent
0d981326ac
commit
81df8a3d2b
9 changed files with 52 additions and 91 deletions
|
@ -21,10 +21,6 @@ import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
|||
describe("Login", () => {
|
||||
let homeserver: HomeserverInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
cy.stubDefaultServer();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.stopHomeserver(homeserver);
|
||||
});
|
||||
|
@ -44,17 +40,18 @@ describe("Login", () => {
|
|||
it("logs in with an existing account and lands on the home screen", () => {
|
||||
cy.injectAxe();
|
||||
|
||||
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");
|
||||
cy.checkA11y();
|
||||
|
||||
// first pick the homeserver, as otherwise the user picker won't be visible
|
||||
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.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");
|
||||
cy.checkA11y();
|
||||
|
||||
cy.findByRole("textbox", { name: "Username" }).type(username);
|
||||
cy.findByPlaceholderText("Password").type(password);
|
||||
cy.findByRole("button", { name: "Sign in" }).click();
|
||||
|
|
|
@ -22,7 +22,6 @@ describe("Registration", () => {
|
|||
let homeserver: HomeserverInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
cy.stubDefaultServer();
|
||||
cy.visit("/#/register");
|
||||
cy.startHomeserver("consent").then((data) => {
|
||||
homeserver = data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue