Skip to content

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

test(e2e): use selector click for voice mode switch when script is supported

Steven Enamakel330bca340750
diff --git a/app/test/e2e/specs/voice-mode.spec.ts b/app/test/e2e/specs/voice-mode.spec.ts
index b97149607a..6055613ea6 100644
--- a/app/test/e2e/specs/voice-mode.spec.ts
+++ b/app/test/e2e/specs/voice-mode.spec.ts
@@ -17,6 +17,7 @@ import { callOpenhumanRpc } from '../helpers/core-rpc';
import { triggerAuthDeepLink } from '../helpers/deep-link-helpers';
import {
clickButton,
+ clickSelector,
dumpAccessibilityTree,
textExists,
waitForWebView,
@@ -112,7 +113,11 @@ describe.skip(// https://github.com/senamakel/openhuman/issues/236
);
expect(voiceStatusMessage).not.toBeNull();
- await clickButton('Switch to text', 10_000);
+ if (supportsExecuteScript()) {
+ await clickSelector('button[aria-label="Switch to text"]', 10_000);
+ } else {
+ await clickButton('Switch to text', 10_000);
+ }
const textRestored = await waitForAnyText(['How can I help', 'Threads', 'New'], 10_000);
expect(textRestored).not.toBeNull();
});