@specter-automation/test 1.0.134 → 1.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -195,6 +195,12 @@ export interface SpawnOptions {
|
|
|
195
195
|
properties?: Record<string, any>;
|
|
196
196
|
spawnController?: boolean;
|
|
197
197
|
name?: string;
|
|
198
|
+
/** If true, the actor will not be destroyed by ClearAllSpawned between tests. */
|
|
199
|
+
persistent?: boolean;
|
|
200
|
+
/** Alias for persistent: keeps the actor alive across tests within a worker. */
|
|
201
|
+
workerScope?: boolean;
|
|
202
|
+
/** Lifecycle scope for the spawned actor ('test' destroys after each test; 'worker' persists across tests). */
|
|
203
|
+
scope?: 'test' | 'worker';
|
|
198
204
|
}
|
|
199
205
|
export interface ClickOptions {
|
|
200
206
|
/**
|
|
@@ -686,7 +686,10 @@ class SpecterWorld {
|
|
|
686
686
|
const assetName = assetPath.split('/').pop()?.split('.')[0];
|
|
687
687
|
const properties = options?.properties;
|
|
688
688
|
const spawnController = options?.spawnController;
|
|
689
|
-
|
|
689
|
+
const persistent = options?.persistent;
|
|
690
|
+
const workerScope = options?.workerScope;
|
|
691
|
+
const scope = options?.scope;
|
|
692
|
+
await this.evaluate("SpawnActor", { assetPath, tag, location, rotation, properties, spawnController, persistent, workerScope, scope }, assetName, tag);
|
|
690
693
|
if (options?.name) {
|
|
691
694
|
return this.actorByTag(tag).named(options.name);
|
|
692
695
|
}
|