Add dendrite support to cypress tests (#9884)

* Minimum hacks required to run cypress tests with dendrite

* Remove wget hack since dendrite containers now have curl

* Add basic dendritedocker plugin & hack into login spec for testing

* Add generic HomeserverInstance interface

* Add env var to configure which homeserver to use

* Remove synapse specific homeserver support api

* Update the rest of the tests to use HomeserverInstance

* Update cypress docs to reference new homeserver abstraction

* Fix formatting issues

* Change dendrite to use main branch container
This commit is contained in:
devonh 2023-01-10 23:29:56 +00:00 committed by GitHub
parent b642df98e9
commit 79033eb034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 947 additions and 362 deletions

View file

@ -18,7 +18,7 @@ limitations under the License.
import type { ISendEventResponse } from "matrix-js-sdk/src/@types/requests";
import type { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
import { SynapseInstance } from "../../plugins/synapsedocker";
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import { SettingLevel } from "../../../src/settings/SettingLevel";
import { Layout } from "../../../src/settings/enums/Layout";
import Chainable = Cypress.Chainable;
@ -67,7 +67,7 @@ const sendEvent = (roomId: string, html = false): Chainable<ISendEventResponse>
};
describe("Timeline", () => {
let synapse: SynapseInstance;
let homeserver: HomeserverInstance;
let roomId: string;
@ -75,9 +75,9 @@ describe("Timeline", () => {
let newAvatarUrl: string;
beforeEach(() => {
cy.startSynapse("default").then((data) => {
synapse = data;
cy.initTestUser(synapse, OLD_NAME).then(() =>
cy.startHomeserver("default").then((data) => {
homeserver = data;
cy.initTestUser(homeserver, OLD_NAME).then(() =>
cy.createRoom({ name: ROOM_NAME }).then((_room1Id) => {
roomId = _room1Id;
}),
@ -86,7 +86,7 @@ describe("Timeline", () => {
});
afterEach(() => {
cy.stopSynapse(synapse);
cy.stopHomeserver(homeserver);
});
describe("useOnlyCurrentProfiles", () => {