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>
This commit is contained in:
YellowSnnowmann
2026-04-03 16:07:25 +05:30
committed by GitHub
co-authored by Claude Sonnet 4.6
parent b7b3d62c58
commit 898fe13477
3 changed files with 15 additions and 7 deletions
+8 -5
View File
@@ -248,7 +248,8 @@ export async function navigateToConversations() {
}
// ---------------------------------------------------------------------------
// Onboarding walkthrough (Onboarding.tsx — 5 steps, indices 04)
// Onboarding walkthrough
// Current flow: Welcome → Local AI → Screen & Accessibility → Tools → Skills (5 steps, indices 04).
// ---------------------------------------------------------------------------
/** Labels used to detect the onboarding overlay (same strings as Onboarding copy). */
@@ -319,12 +320,14 @@ export async function walkOnboarding(logPrefix = '[E2E]') {
}
/**
* If onboarding is showing, walk through it. Safe no-op when already on Home / no overlay.
* Walk through onboarding if it is visible, or no-op if already on Home.
*
* Delegates to walkOnboarding, which polls up to 8 × 400 ms for the overlay
* to appear before giving up — safe to call unconditionally after auth so
* timing races do not cause the helper to skip onboarding prematurely.
*/
export async function completeOnboardingIfVisible(logPrefix = '[E2E]') {
if (await onboardingOverlayLikelyVisible()) {
await walkOnboarding(logPrefix);
}
await walkOnboarding(logPrefix);
}
// ---------------------------------------------------------------------------
@@ -9,7 +9,11 @@ import {
waitForWebView,
waitForWindowVisible,
} from '../helpers/element-helpers';
import { navigateToConversations, navigateViaHash, walkOnboarding } from '../helpers/shared-flows';
import {
completeOnboardingIfVisible,
navigateToConversations,
navigateViaHash,
} from '../helpers/shared-flows';
import { clearRequestLog, getRequestLog, startMockServer, stopMockServer } from '../mock-server';
function stepLog(message: string, context?: unknown) {
@@ -70,7 +74,7 @@ suiteRunner('Conversations web channel flow', () => {
}
stepLog('complete onboarding');
await walkOnboarding('[ConversationsE2E]');
await completeOnboardingIfVisible('[ConversationsE2E]');
stepLog('open conversations');
// Navigate via hash — "Message OpenHuman" button may not reliably open conversations
+1
View File
@@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y \
libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev \
librsvg2-dev patchelf libssl-dev \
xvfb at-spi2-core dbus-x11 webkit2gtk-driver \
clang libclang-dev cmake \
git ca-certificates \
&& rm -rf /var/lib/apt/lists/*