diff --git a/packages/element-web-playwright-common/src/fixtures/user.ts b/packages/element-web-playwright-common/src/fixtures/user.ts index a5fae14b9f..073b6149d8 100644 --- a/packages/element-web-playwright-common/src/fixtures/user.ts +++ b/packages/element-web-playwright-common/src/fixtures/user.ts @@ -70,7 +70,11 @@ export const test = base.extend<{ user: Credentials; }>({ displayName: undefined, - credentials: async ({ homeserver, displayName: testDisplayName }, use, testInfo) => { + + // We don't directly depend upon the `context` fixture, but we do need to make sure that it has been run + // before this fixture, since it is responsible for configuring the APIRequestContext on the homeserver, so + // without it we cannot register the user. + credentials: async ({ context, homeserver, displayName: testDisplayName }, use, testInfo) => { const names = ["Alice", "Bob", "Charlie", "Daniel", "Eve", "Frank", "Grace", "Hannah", "Isaac", "Judy"]; const password = uniqueId("password_"); const displayName = testDisplayName ?? sample(names)!;