Add basic performance testing via Cypress (#8586)

This commit is contained in:
J. Ryan Stinnett
2022-05-17 15:38:45 +01:00
committed by GitHub
parent 83b3dfa341
commit c122c5cd3b
17 changed files with 169 additions and 18 deletions
@@ -42,11 +42,15 @@ describe("Registration", () => {
cy.get("#mx_RegistrationForm_username").type("alice");
cy.get("#mx_RegistrationForm_password").type("totally a great password");
cy.get("#mx_RegistrationForm_passwordConfirm").type("totally a great password");
cy.startMeasuring("create-account");
cy.get(".mx_Login_submit").click();
cy.get(".mx_RegistrationEmailPromptDialog button.mx_Dialog_primary").click();
cy.stopMeasuring("create-account");
cy.get(".mx_InteractiveAuthEntryComponents_termsPolicy input").click();
cy.startMeasuring("from-submit-to-home");
cy.get(".mx_InteractiveAuthEntryComponents_termsSubmit").click();
cy.url().should('contain', '/#/home');
cy.stopMeasuring("from-submit-to-home");
});
});
@@ -49,9 +49,11 @@ describe("Login", () => {
cy.get("#mx_LoginForm_username").type(username);
cy.get("#mx_LoginForm_password").type(password);
cy.startMeasuring("from-submit-to-home");
cy.get(".mx_Login_submit").click();
cy.url().should('contain', '/#/home');
cy.stopMeasuring("from-submit-to-home");
});
});
});
@@ -54,10 +54,12 @@ describe("Create Room", () => {
// Fill room address
cy.get('[label="Room address"]').type("test-room-1");
// Submit
cy.startMeasuring("from-submit-to-room");
cy.get(".mx_Dialog_primary").click();
});
cy.url().should("contain", "/#/room/#test-room-1:localhost");
cy.stopMeasuring("from-submit-to-room");
cy.get(".mx_RoomHeader_nametext").contains(name);
cy.get(".mx_RoomHeader_topic").contains(topic);
});