From 13975354b6eb1e2f3806e53a16bee3e0956fa7d0 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 27 Jan 2026 12:48:23 -0800 Subject: [PATCH] update SingleUserScene to accept results from bitwarden/server#6909 --- .../src/scene-templates/single-user.scene.ts | 11 ++++++++++- libs/playwright-helpers/src/scene.ts | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libs/playwright-helpers/src/scene-templates/single-user.scene.ts b/libs/playwright-helpers/src/scene-templates/single-user.scene.ts index acfb8313159..e50882103e2 100644 --- a/libs/playwright-helpers/src/scene-templates/single-user.scene.ts +++ b/libs/playwright-helpers/src/scene-templates/single-user.scene.ts @@ -1,10 +1,19 @@ +import { KdfType } from "@bitwarden/key-management"; +import { EncString } from "@bitwarden/sdk-internal"; import { UserId } from "@bitwarden/user-core"; import { Scene } from "../scene"; import { SceneTemplate } from "./scene-template"; -type SceneResult = UserId; +type SceneResult = { + userId: UserId; + kdf: KdfType; + kdfIterations?: number; + key: EncString; + privateKey: EncString; + publicKey: string; +}; type UpParams = { email: string; emailVerified?: boolean; diff --git a/libs/playwright-helpers/src/scene.ts b/libs/playwright-helpers/src/scene.ts index 4c0975eed6c..299c0e914c5 100644 --- a/libs/playwright-helpers/src/scene.ts +++ b/libs/playwright-helpers/src/scene.ts @@ -4,8 +4,7 @@ import { SceneTemplate } from "./scene-templates/scene-template"; * A Scene contains logic to set up and tear down data for a test on the server. * It is created by providing a Scene Template, which contains the arguments the server requires to create the data. * - * Scenes are `Disposable`, meaning they must be used with the `using` keyword and will be automatically torn down when disposed. - * Options exist to modify this behavior. + * Scenes are intended to be initialized through the {@link Play.scene} method. * * - {@link SceneOptions.noDown}: Useful for setting up data then using codegen to create tests that use the data. Remember to tear down the data manually. * - {@link SceneOptions.downAfterAll}: Useful for expensive setups that you want to share across all tests in a worker or for writing acts. @@ -28,10 +27,12 @@ export class Scene { return this._template; } + /** The template arguments used to initialize this scene */ get upArgs(): UpParams { return this.template.upArgs; } + /** The value returned from the seeder API for this scene */ get returnValue(): Returns { if (!this.inited) { throw new Error("Scene must be initialized before accessing returnValue");