Skip to content

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

fix(e2e): assert visible tour and removed job

Steven Enamakelae6f410e05b2
diff --git a/app/test/e2e/helpers/reset-app.ts b/app/test/e2e/helpers/reset-app.ts
index 96850dbc93..135e39999e 100644
--- a/app/test/e2e/helpers/reset-app.ts
+++ b/app/test/e2e/helpers/reset-app.ts
@@ -20,7 +20,12 @@
*/
import { waitForApp, waitForAppReady } from './app-helpers';
import { callOpenhumanRpc } from './core-rpc';
-import { clickText, textExists, waitForWebView, waitForWindowVisible } from './element-helpers';
+import {
+ clickText,
+ visibleTextExists,
+ waitForWebView,
+ waitForWindowVisible,
+} from './element-helpers';
import { triggerAuthLoopbackBypass } from './loopback-auth-helpers';
import { supportsExecuteScript } from './platform';
import { dismissBootCheckGateIfVisible, waitForHomePage, walkOnboarding } from './shared-flows';
@@ -51,7 +56,7 @@ function stepLog(message: string): void {
/** Dismiss the Joyride tour if it starts after the home route becomes ready. */
async function dismissLateWalkthrough(): Promise<void> {
const appeared = await browser
- .waitUntil(async () => textExists('Skip tour'), {
+ .waitUntil(async () => visibleTextExists('Skip tour'), {
timeout: 4_000,
interval: 250,
timeoutMsg: 'waiting for the walkthrough Skip tour action',
@@ -61,7 +66,7 @@ async function dismissLateWalkthrough(): Promise<void> {
if (!appeared) return;
await clickText('Skip tour', 2_000);
- await browser.waitUntil(async () => !(await textExists('Skip tour')), {
+ await browser.waitUntil(async () => !(await visibleTextExists('Skip tour')), {
timeout: 5_000,
interval: 250,
timeoutMsg: 'walkthrough Skip tour action remained visible after dismissal',
diff --git a/app/test/e2e/specs/cron-jobs-flow.spec.ts b/app/test/e2e/specs/cron-jobs-flow.spec.ts
index badceb8b1b..4eb3a09a02 100644
--- a/app/test/e2e/specs/cron-jobs-flow.spec.ts
+++ b/app/test/e2e/specs/cron-jobs-flow.spec.ts
@@ -242,9 +242,8 @@ describe('Cron jobs settings panel (real UI flow)', () => {
// The removal RPC + optimistic re-render can take longer on the slower macOS
// runner, so poll for up to 20s rather than 10s before declaring the row stuck.
const gone = await browser.waitUntil(
- async () =>
- !(await browser.$(`[data-testid="cron-job-row-${morningBriefingId}"]`).isExisting()),
- { timeout: 20_000, interval: 500, timeoutMsg: 'morning_briefing row never disappeared' }
+ async () => !(await browser.$(`[data-testid="cron-job-row-${removableJobId}"]`).isExisting()),
+ { timeout: 20_000, interval: 500, timeoutMsg: 'user-created cron row never disappeared' }
);
expect(gone).toBe(true);
diff --git a/app/test/e2e/specs/settings-channels-permissions.spec.ts b/app/test/e2e/specs/settings-channels-permissions.spec.ts
index 996a8bd39a..546e87f659 100644
--- a/app/test/e2e/specs/settings-channels-permissions.spec.ts
+++ b/app/test/e2e/specs/settings-channels-permissions.spec.ts
@@ -15,8 +15,8 @@ import { callOpenhumanRpc } from '../helpers/core-rpc';
import {
clickSelector,
getSwitchCheckedByLabel,
- textExists,
toggleSwitchByLabel,
+ visibleTextExists,
waitForText,
} from '../helpers/element-helpers';
import { resetApp } from '../helpers/reset-app';
@@ -57,7 +57,7 @@ describe('Settings - Channels & Permissions', () => {
// resetApp must finish dismissing the post-onboarding Joyride before a
// settings flow starts; otherwise the spotlight overlay intercepts the
// hash navigation and leaves the app on Chat.
- expect(await textExists('Skip tour')).toBe(false);
+ expect(await visibleTextExists('Skip tour')).toBe(false);
// The messaging panel now offers "Set as default" only on *connected*
// channels. In a fresh workspace the only always-connected channel is Web