Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: make IMAP failure probe deterministic

Steven Enamakel01b8dcbf83e5
diff --git a/app/test/e2e/helpers/element-helpers.ts b/app/test/e2e/helpers/element-helpers.ts
index 5c468386ad..e176f19393 100644
--- a/app/test/e2e/helpers/element-helpers.ts
+++ b/app/test/e2e/helpers/element-helpers.ts
@@ -95,20 +95,23 @@ async function clickAtElement(el: ChainablePromiseElement): Promise<void> {
const centerX = Math.round(location.x + size.width / 2);
const centerY = Math.round(location.y + size.height / 2);
- await browser.performActions([
- {
- type: 'pointer',
- id: 'mouse1',
- parameters: { pointerType: 'mouse' },
- actions: [
- { type: 'pointerMove', duration: 10, x: centerX, y: centerY },
- { type: 'pointerDown', button: 0 },
- { type: 'pause', duration: 50 },
- { type: 'pointerUp', button: 0 },
- ],
- },
- ]);
- await browser.releaseActions();
+ try {
+ await browser.performActions([
+ {
+ type: 'pointer',
+ id: 'mouse1',
+ parameters: { pointerType: 'mouse' },
+ actions: [
+ { type: 'pointerMove', duration: 10, x: centerX, y: centerY },
+ { type: 'pointerDown', button: 0 },
+ { type: 'pause', duration: 50 },
+ { type: 'pointerUp', button: 0 },
+ ],
+ },
+ ]);
+ } finally {
+ await browser.releaseActions();
+ }
}
/** Click an existing element through the shared cross-platform click path. */
diff --git a/app/test/e2e/specs/credential-channels-flow.spec.ts b/app/test/e2e/specs/credential-channels-flow.spec.ts
index ad946c5500..2afca135fb 100644
--- a/app/test/e2e/specs/credential-channels-flow.spec.ts
+++ b/app/test/e2e/specs/credential-channels-flow.spec.ts
@@ -214,7 +214,7 @@ describe('Credential channels — Yuanbao and Email (IMAP/SMTP)', () => {
const credentials =
channel === 'email'
- ? { ...validCredentials, imap_host: 'imap.e2e.invalid', imap_port: '993' }
+ ? { ...validCredentials, imap_host: '127.0.0.1', imap_port: '0' }
: { ...validCredentials, api_domain: `http://127.0.0.1:${getMockServerPort()}` };
const out = await callOpenhumanRpc('openhuman.channels_connect', {
channel,