Skip to content

Commit 898fe13

Browse files
Feat: update complete onboarding helper (#299)
* fix(e2e): make completeOnboardingIfVisible resilient by delegating to walkOnboarding The previous implementation did a single onboardingOverlayLikelyVisible() check before calling walkOnboarding. This created a timing race: if onboarding had not yet rendered at call time the helper returned early, leaving the overlay blocking subsequent steps. walkOnboarding already handles both cases correctly — it polls up to 8 × 400 ms for the overlay before giving up, then no-ops gracefully if not visible. completeOnboardingIfVisible now delegates to it unconditionally, eliminating the race without changing observable behaviour. Also updates the section comment to accurately describe the current 5-step onboarding sequence (Welcome → Local AI → Screen & Accessibility → Tools → Skills) following the removal of MnemonicStep in #279. Closes part of #201 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(e2e): use completeOnboardingIfVisible in conversations spec conversations-web-channel-flow.spec.ts was the only spec that called walkOnboarding directly instead of the shared completeOnboardingIfVisible helper. Align it with all other specs so the single resilient code path is used consistently. Closes #201 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(e2e): add clang and cmake to Dockerfile dependencies Updated the e2e Dockerfile to include clang and cmake as additional dependencies, enhancing the build environment for end-to-end testing. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b7b3d62 commit 898fe13

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

app/test/e2e/helpers/shared-flows.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ export async function navigateToConversations() {
248248
}
249249

250250
// ---------------------------------------------------------------------------
251-
// Onboarding walkthrough (Onboarding.tsx — 5 steps, indices 0–4)
251+
// Onboarding walkthrough
252+
// Current flow: Welcome → Local AI → Screen & Accessibility → Tools → Skills (5 steps, indices 0–4).
252253
// ---------------------------------------------------------------------------
253254

254255
/** Labels used to detect the onboarding overlay (same strings as Onboarding copy). */
@@ -319,12 +320,14 @@ export async function walkOnboarding(logPrefix = '[E2E]') {
319320
}
320321

321322
/**
322-
* If onboarding is showing, walk through it. Safe no-op when already on Home / no overlay.
323+
* Walk through onboarding if it is visible, or no-op if already on Home.
324+
*
325+
* Delegates to walkOnboarding, which polls up to 8 × 400 ms for the overlay
326+
* to appear before giving up — safe to call unconditionally after auth so
327+
* timing races do not cause the helper to skip onboarding prematurely.
323328
*/
324329
export async function completeOnboardingIfVisible(logPrefix = '[E2E]') {
325-
if (await onboardingOverlayLikelyVisible()) {
326-
await walkOnboarding(logPrefix);
327-
}
330+
await walkOnboarding(logPrefix);
328331
}
329332

330333
// ---------------------------------------------------------------------------

app/test/e2e/specs/conversations-web-channel-flow.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import {
99
waitForWebView,
1010
waitForWindowVisible,
1111
} from '../helpers/element-helpers';
12-
import { navigateToConversations, navigateViaHash, walkOnboarding } from '../helpers/shared-flows';
12+
import {
13+
completeOnboardingIfVisible,
14+
navigateToConversations,
15+
navigateViaHash,
16+
} from '../helpers/shared-flows';
1317
import { clearRequestLog, getRequestLog, startMockServer, stopMockServer } from '../mock-server';
1418

1519
function stepLog(message: string, context?: unknown) {
@@ -70,7 +74,7 @@ suiteRunner('Conversations web channel flow', () => {
7074
}
7175

7276
stepLog('complete onboarding');
73-
await walkOnboarding('[ConversationsE2E]');
77+
await completeOnboardingIfVisible('[ConversationsE2E]');
7478

7579
stepLog('open conversations');
7680
// Navigate via hash — "Message OpenHuman" button may not reliably open conversations

e2e/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y \
2121
libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev \
2222
librsvg2-dev patchelf libssl-dev \
2323
xvfb at-spi2-core dbus-x11 webkit2gtk-driver \
24+
clang libclang-dev cmake \
2425
git ca-certificates \
2526
&& rm -rf /var/lib/apt/lists/*
2627

0 commit comments

Comments
 (0)