Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions app/test/e2e/helpers/shared-flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export async function navigateToConversations() {
}

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

/** Labels used to detect the onboarding overlay (same strings as Onboarding copy). */
Expand Down Expand Up @@ -253,12 +254,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);
}

// ---------------------------------------------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions app/test/e2e/specs/conversations-web-channel-flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand Down
Loading