From c8e46251f526b33cbb885321dfda9fcc0ee7e056 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 13 Jan 2025 08:57:08 +0000 Subject: [PATCH] Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/login/login-consent.spec.ts | 6 ++++-- playwright/e2e/spotlight/spotlight.spec.ts | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/playwright/e2e/login/login-consent.spec.ts b/playwright/e2e/login/login-consent.spec.ts index 31d0ccc652c..3a35e72f136 100644 --- a/playwright/e2e/login/login-consent.spec.ts +++ b/playwright/e2e/login/login-consent.spec.ts @@ -91,10 +91,12 @@ test.use({ }, }, }, - credentials: async ({ context, homeserver }, use) => { + context: async ({ context, homeserver }, use) => { // Restart the homeserver to wipe its in-memory db so we can reuse the same user ID without cross-signing prompts await homeserver.restart(); - + await use(context); + }, + credentials: async ({ context, homeserver }, use) => { const displayName = "Dave"; const credentials = await homeserver.registerUser(username, password, displayName); console.log(`Registered test user @user:localhost with displayname ${displayName}`); diff --git a/playwright/e2e/spotlight/spotlight.spec.ts b/playwright/e2e/spotlight/spotlight.spec.ts index 22a3a41a811..5ee80d6ea71 100644 --- a/playwright/e2e/spotlight/spotlight.spec.ts +++ b/playwright/e2e/spotlight/spotlight.spec.ts @@ -81,10 +81,10 @@ const test = base.extend<{ }); await use({ name, roomId }); }, - credentials: async ({ credentials, homeserver }, use) => { - // Restart the homeserver to wipe its in-memory db so we can purge the user_directory of users + context: async ({ context, homeserver }, use) => { + // Restart the homeserver to wipe its in-memory db so we can reuse the same user ID without cross-signing prompts await homeserver.restart(); - await use(credentials); + await use(context); }, });