You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Improve stability of Playwright screenshots (#12009)
* Stabilise bot MXID length Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise test user MXID Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d6d3585c30
commit
5ae5855fd9
@ -70,7 +70,12 @@ export class Bot extends Client {
|
||||
|
||||
private async getCredentials(): Promise<Credentials> {
|
||||
if (this.credentials) return this.credentials;
|
||||
const username = uniqueId(this.opts.userIdPrefix);
|
||||
// We want to pad the uniqueId but not the prefix
|
||||
const username =
|
||||
this.opts.userIdPrefix +
|
||||
uniqueId(this.opts.userIdPrefix)
|
||||
.substring(this.opts.userIdPrefix?.length ?? 0)
|
||||
.padStart(4, "0");
|
||||
const password = uniqueId("password_");
|
||||
console.log(`getBot: Create bot user ${username} with opts ${JSON.stringify(this.opts)}`);
|
||||
this.credentials = await this.homeserver.registerUser(username, password, this.opts.displayName);
|
||||
|
Reference in New Issue
Block a user