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:
parent
b642df98e9
commit
79033eb034
50 changed files with 947 additions and 362 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { SynapseInstance } from "../../plugins/synapsedocker";
|
||||
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
||||
import { MatrixClient } from "../../global";
|
||||
import { UserCredentials } from "../../support/login";
|
||||
|
||||
|
@ -94,17 +94,17 @@ function expectKickedMessage(shouldExist: boolean) {
|
|||
|
||||
describe("Integration Manager: Kick", () => {
|
||||
let testUser: UserCredentials;
|
||||
let synapse: SynapseInstance;
|
||||
let homeserver: HomeserverInstance;
|
||||
let integrationManagerUrl: string;
|
||||
|
||||
beforeEach(() => {
|
||||
cy.serveHtmlFile(INTEGRATION_MANAGER_HTML).then((url) => {
|
||||
integrationManagerUrl = url;
|
||||
});
|
||||
cy.startSynapse("default").then((data) => {
|
||||
synapse = data;
|
||||
cy.startHomeserver("default").then((data) => {
|
||||
homeserver = data;
|
||||
|
||||
cy.initTestUser(synapse, USER_DISPLAY_NAME, () => {
|
||||
cy.initTestUser(homeserver, USER_DISPLAY_NAME, () => {
|
||||
cy.window().then((win) => {
|
||||
win.localStorage.setItem("mx_scalar_token", INTEGRATION_MANAGER_TOKEN);
|
||||
win.localStorage.setItem(`mx_scalar_token_at_${integrationManagerUrl}`, INTEGRATION_MANAGER_TOKEN);
|
||||
|
@ -140,12 +140,12 @@ describe("Integration Manager: Kick", () => {
|
|||
name: ROOM_NAME,
|
||||
}).as("roomId");
|
||||
|
||||
cy.getBot(synapse, { displayName: BOT_DISPLAY_NAME, autoAcceptInvites: true }).as("bob");
|
||||
cy.getBot(homeserver, { displayName: BOT_DISPLAY_NAME, autoAcceptInvites: true }).as("bob");
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.stopSynapse(synapse);
|
||||
cy.stopHomeserver(homeserver);
|
||||
cy.stopWebServers();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue