mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 11:51:36 +02:00
Fix "Error: No request context set" in credentials fixture (#145)
Make sure that we've run the `context` fixture first, so that the request API is configured
This commit is contained in:
parent
4c928d2854
commit
0d46bc924c
@ -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)!;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user