1
0
mirror of https://github.com/element-hq/element-web.git synced 2025-07-31 19:44:30 +03:00

Prepare for switch to testcontainers in playwright (#28880)

* Remove access to homeserver.config.baseUrl field in favour of homeserver.baseUrl

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use sane default_server_config and specify server.invalid in the specific tests which demand it

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* break cycle

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* typo

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-01-07 09:21:07 +00:00
committed by GitHub
parent 1e758cacae
commit a73faffe37
22 changed files with 102 additions and 88 deletions

View File

@ -97,7 +97,7 @@ export class Bot extends Client {
private async buildClient(): Promise<JSHandle<ExtendedMatrixClient>> {
const credentials = await this.getCredentials();
const clientHandle = await this.page.evaluateHandle(
async ({ homeserver, credentials, opts }) => {
async ({ baseUrl, credentials, opts }) => {
function getLogger(loggerName: string): Logger {
const logger = {
getChild: (namespace: string) => getLogger(`${loggerName}:${namespace}`),
@ -157,7 +157,7 @@ export class Bot extends Client {
};
const cli = new window.matrixcs.MatrixClient({
baseUrl: homeserver.baseUrl,
baseUrl,
userId: credentials.userId,
deviceId: credentials.deviceId,
accessToken: credentials.accessToken,
@ -179,7 +179,7 @@ export class Bot extends Client {
return cli;
},
{
homeserver: this.homeserver.config,
baseUrl: this.homeserver.baseUrl,
credentials,
opts: this.opts,
},