testdriverai 7.2.59 → 7.2.61

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.
@@ -7,38 +7,39 @@ permissions:
7
7
  on:
8
8
  schedule:
9
9
  # Every 6 hours
10
- - cron: '0 */6 * * *'
10
+ - cron: "0 */6 * * *"
11
11
  workflow_dispatch: # Allow manual trigger
12
12
 
13
13
  jobs:
14
14
  test-linux:
15
15
  runs-on: ubuntu-latest
16
-
16
+
17
17
  steps:
18
- - uses: actions/checkout@v4
19
-
20
- - name: Setup Node.js
21
- uses: actions/setup-node@v4
22
- with:
23
- node-version: '20'
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm ci
28
-
29
- - name: Install Sentry CLI
30
- run: npm install -g @sentry/cli
31
-
32
- - name: Run Linux tests with Sentry Cron monitoring
33
- run: |
34
- sentry-cli monitors run testdriver-linux-acceptance -- npx vitest run examples/*.test.mjs
35
- env:
36
- SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
37
- TD_API_KEY: ${{ secrets.TD_API_KEY }}
38
- TD_OS: linux
39
-
40
- - name: Upload test results to Sentry Prevent
41
- if: ${{ !cancelled() }}
42
- uses: getsentry/prevent-action@v0
43
- with:
44
- token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Install Sentry CLI
30
+ run: npm install -g @sentry/cli
31
+
32
+ - name: Run Linux tests with Sentry Cron monitoring
33
+ run: |
34
+ sentry-cli monitors run testdriver-linux-acceptance -- npx vitest run examples/*.test.mjs
35
+ env:
36
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
37
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
38
+ TD_OS: linux
39
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
40
+
41
+ - name: Upload test results to Sentry Prevent
42
+ if: ${{ !cancelled() }}
43
+ uses: getsentry/prevent-action@v0
44
+ with:
45
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [7.2.61](https://github.com/testdriverai/testdriverai/compare/v7.2.60...v7.2.61) (2026-01-30)
2
+
3
+
4
+
5
+ ## [7.2.60](https://github.com/testdriverai/testdriverai/compare/v7.2.59...v7.2.60) (2026-01-27)
6
+
7
+
8
+
1
9
  ## [7.2.59](https://github.com/testdriverai/testdriverai/compare/v7.2.58...v7.2.59) (2026-01-27)
2
10
 
3
11
 
package/agent/index.js CHANGED
@@ -129,6 +129,7 @@ class TestDriverAgent extends EventEmitter2 {
129
129
  () => this.sourceMapper.currentFilePath || this.thisFile,
130
130
  this.cliArgs.options.redrawThreshold,
131
131
  null, // getDashcamElapsedTime - will be set by SDK when dashcam is available
132
+ () => this.softAssertMode, // getter for soft assert mode (used by act())
132
133
  );
133
134
  this.commands = commandsResult.commands;
134
135
  this.redraw = commandsResult.redraw;
@@ -169,6 +170,9 @@ class TestDriverAgent extends EventEmitter2 {
169
170
  // Flag to indicate if the agent should stop execution
170
171
  this.stopped = false;
171
172
 
173
+ // Flag to suppress assertion throws (used by act() to make check-phase assertions non-fatal)
174
+ this.softAssertMode = false;
175
+
172
176
  this.emitter.emit(events.log.log, JSON.stringify(environment));
173
177
  this.emitter.emit(events.log.log, JSON.stringify(cliArgs));
174
178
  }
@@ -83,6 +83,7 @@ const createCommands = (
83
83
  getCurrentFilePath,
84
84
  redrawThreshold = 0.01,
85
85
  getDashcamElapsedTime = null,
86
+ getSoftAssertMode = () => false, // getter for soft assert mode (used by act())
86
87
  ) => {
87
88
  // Create SDK instance with emitter, config, and session
88
89
  const sdk = createSDK(emitter, config, sessionInstance);
@@ -1516,7 +1517,9 @@ const createCommands = (
1516
1517
  * @param {Object} [options] - Additional options (reserved for future use)
1517
1518
  */
1518
1519
  "assert": async (assertion, options = {}) => {
1519
- let response = await assert(assertion, true);
1520
+ // In soft assert mode (during act()), don't throw on failure
1521
+ const shouldThrow = !getSoftAssertMode();
1522
+ let response = await assert(assertion, shouldThrow);
1520
1523
 
1521
1524
  return response;
1522
1525
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "7.2.59",
3
+ "version": "7.2.61",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",
package/sdk.js CHANGED
@@ -3533,6 +3533,10 @@ CAPTCHA_SOLVER_EOF`,
3533
3533
  const originalCheckCount = this.agent.checkCount;
3534
3534
  this.agent.checkCount = 0;
3535
3535
 
3536
+ // Enable soft assert mode so check-phase assertions don't throw
3537
+ const originalSoftAssertMode = this.agent.softAssertMode;
3538
+ this.agent.softAssertMode = true;
3539
+
3536
3540
  // Emit scoped start marker for ai()
3537
3541
  this.emitter.emit(events.log.log, formatter.formatAIStart(task));
3538
3542
 
@@ -3553,9 +3557,10 @@ CAPTCHA_SOLVER_EOF`,
3553
3557
  formatter.formatAIComplete(duration, true),
3554
3558
  );
3555
3559
 
3556
- // Restore original checkLimit
3560
+ // Restore original state
3557
3561
  this.agent.checkLimit = originalCheckLimit;
3558
3562
  this.agent.checkCount = originalCheckCount;
3563
+ this.agent.softAssertMode = originalSoftAssertMode;
3559
3564
 
3560
3565
  return {
3561
3566
  success: true,
@@ -3574,9 +3579,10 @@ CAPTCHA_SOLVER_EOF`,
3574
3579
  formatter.formatAIComplete(duration, false, error.message),
3575
3580
  );
3576
3581
 
3577
- // Restore original checkLimit
3582
+ // Restore original state
3578
3583
  this.agent.checkLimit = originalCheckLimit;
3579
3584
  this.agent.checkCount = originalCheckCount;
3585
+ this.agent.softAssertMode = originalSoftAssertMode;
3580
3586
 
3581
3587
  // Create an enhanced error with additional context using AIError class
3582
3588
  throw new AIError(`AI failed: ${error.message}`, {