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
|
@ -18,21 +18,21 @@ limitations under the License.
|
|||
|
||||
import { SinonStub } from "cypress/types/sinon";
|
||||
|
||||
import { SynapseInstance } from "../../plugins/synapsedocker";
|
||||
import { HomeserverInstance } from "../../plugins/utils/homeserver";
|
||||
|
||||
describe("Consent", () => {
|
||||
let synapse: SynapseInstance;
|
||||
let homeserver: HomeserverInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
cy.startSynapse("consent").then((data) => {
|
||||
synapse = data;
|
||||
cy.startHomeserver("consent").then((data) => {
|
||||
homeserver = data;
|
||||
|
||||
cy.initTestUser(synapse, "Bob");
|
||||
cy.initTestUser(homeserver, "Bob");
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.stopSynapse(synapse);
|
||||
cy.stopHomeserver(homeserver);
|
||||
});
|
||||
|
||||
it("should prompt the user to consent to terms when server deems it necessary", () => {
|
||||
|
@ -53,8 +53,8 @@ describe("Consent", () => {
|
|||
cy.get<SinonStub>("@windowOpen").then((stub) => {
|
||||
const url = stub.getCall(0).args[0];
|
||||
|
||||
// Go to Synapse's consent page and accept it
|
||||
cy.origin(synapse.baseUrl, { args: { url } }, ({ url }) => {
|
||||
// Go to Homeserver's consent page and accept it
|
||||
cy.origin(homeserver.baseUrl, { args: { url } }, ({ url }) => {
|
||||
cy.visit(url);
|
||||
|
||||
cy.get('[type="submit"]').click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue