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 Chainable = Cypress.Chainable;
|
||||
|
||||
function assertNoToasts(): void {
|
||||
|
@ -40,10 +40,10 @@ function rejectToast(expectedTitle: string): void {
|
|||
}
|
||||
|
||||
describe("Analytics Toast", () => {
|
||||
let synapse: SynapseInstance;
|
||||
let homeserver: HomeserverInstance;
|
||||
|
||||
afterEach(() => {
|
||||
cy.stopSynapse(synapse);
|
||||
cy.stopHomeserver(homeserver);
|
||||
});
|
||||
|
||||
it("should not show an analytics toast if config has nothing about posthog", () => {
|
||||
|
@ -55,9 +55,9 @@ describe("Analytics Toast", () => {
|
|||
});
|
||||
});
|
||||
|
||||
cy.startSynapse("default").then((data) => {
|
||||
synapse = data;
|
||||
cy.initTestUser(synapse, "Tod");
|
||||
cy.startHomeserver("default").then((data) => {
|
||||
homeserver = data;
|
||||
cy.initTestUser(homeserver, "Tod");
|
||||
});
|
||||
|
||||
rejectToast("Notifications");
|
||||
|
@ -78,9 +78,9 @@ describe("Analytics Toast", () => {
|
|||
});
|
||||
});
|
||||
|
||||
cy.startSynapse("default").then((data) => {
|
||||
synapse = data;
|
||||
cy.initTestUser(synapse, "Tod");
|
||||
cy.startHomeserver("default").then((data) => {
|
||||
homeserver = data;
|
||||
cy.initTestUser(homeserver, "Tod");
|
||||
rejectToast("Notifications");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue