@specter-automation/test 1.0.154 → 1.0.156

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.
@@ -473,6 +473,8 @@ export declare class ActorLocator<T = any> extends SpecterLocator<T> {
473
473
  */
474
474
  getBehaviorTrail(options?: {
475
475
  limit?: number;
476
+ /** The state or task the caller is looking for: gameplay coverage counts it as tested (the AI matchers set it) */
477
+ checking?: string;
476
478
  }): Promise<BehaviorTrail>;
477
479
  /**
478
480
  * Evaluates spatial movement vector, speed, and direction relative to a target actor or coordinates.
@@ -1103,7 +1103,10 @@ class ActorLocator extends specter_locator_1.SpecterLocator {
1103
1103
  * The AI matchers show it when they fail; `describeBehaviorTrail` turns it into lines.
1104
1104
  */
1105
1105
  async getBehaviorTrail(options) {
1106
- const response = await this.evaluate("GetAITrail", { limit: options?.limit ?? 20 }, undefined, true);
1106
+ const payload = { limit: options?.limit ?? 20 };
1107
+ if (options?.checking)
1108
+ payload.checking = options.checking;
1109
+ const response = await this.evaluate("GetAITrail", payload, undefined, true);
1107
1110
  if (response?.status === 'error' || !response?.data) {
1108
1111
  throw new Error(response?.message || 'No AI trail: not an AI controller, a pawn one possesses, or an actor with a StateTree component.');
1109
1112
  }
@@ -349,7 +349,7 @@ exports.aiExpect = test_1.expect.extend((0, instrument_1.instrumentMatchers)(wit
349
349
  let lastError = '';
350
350
  while (Date.now() - startTime < timeout) {
351
351
  try {
352
- const trail = await locator.getBehaviorTrail({ limit: 1 });
352
+ const trail = await locator.getBehaviorTrail({ limit: 1, checking: stateName });
353
353
  lastPath = trail.running ? trail.activePath : [];
354
354
  lastLogic = trail.logic;
355
355
  lastError = '';
@@ -415,7 +415,7 @@ exports.aiExpect = test_1.expect.extend((0, instrument_1.instrumentMatchers)(wit
415
415
  let lastError = '';
416
416
  while (true) {
417
417
  try {
418
- const trail = await locator.getBehaviorTrail({ limit: 400 });
418
+ const trail = await locator.getBehaviorTrail({ limit: 400, checking: stateName });
419
419
  const paths = trail.events.flatMap((event) => (event.kind === 'active' ? [event.path] : []));
420
420
  if (trail.running)
421
421
  paths.push(trail.activePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specter-automation/test",
3
- "version": "1.0.154",
3
+ "version": "1.0.156",
4
4
  "description": "Playwright integration for Unreal Engine automation via Specter",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",