You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-04 09:42:42 +03:00
Merge remote-tracking branch 'origin/develop' into rav/edited_events
This commit is contained in:
@@ -22,6 +22,10 @@ import { Credentials } from "./synapse";
|
||||
import Chainable = Cypress.Chainable;
|
||||
|
||||
interface CreateBotOpts {
|
||||
/**
|
||||
* A prefix to use for the userid. If unspecified, "bot_" will be used.
|
||||
*/
|
||||
userIdPrefix?: string;
|
||||
/**
|
||||
* Whether the bot should automatically accept all invites.
|
||||
*/
|
||||
@@ -41,6 +45,7 @@ interface CreateBotOpts {
|
||||
}
|
||||
|
||||
const defaultCreateBotOptions = {
|
||||
userIdPrefix: "bot_",
|
||||
autoAcceptInvites: true,
|
||||
startClient: true,
|
||||
bootstrapCrossSigning: true,
|
||||
@@ -157,7 +162,7 @@ function setupBotClient(
|
||||
|
||||
Cypress.Commands.add("getBot", (synapse: SynapseInstance, opts: CreateBotOpts): Chainable<CypressBot> => {
|
||||
opts = Object.assign({}, defaultCreateBotOptions, opts);
|
||||
const username = Cypress._.uniqueId("userId_");
|
||||
const username = Cypress._.uniqueId(opts.userIdPrefix);
|
||||
const password = Cypress._.uniqueId("password_");
|
||||
return cy
|
||||
.registerUser(synapse, username, password, opts.displayName)
|
||||
|
||||
Reference in New Issue
Block a user