Add welcome onboarding and remove default localhost host

This commit is contained in:
Mohamed Boudra
2026-01-24 17:01:12 +07:00
parent f8f37ace58
commit 9b82c02fd2
17 changed files with 1222 additions and 250 deletions
+1 -1
View File
@@ -11,5 +11,5 @@ test('daemon is connected in settings', async ({ page }) => {
await openSettings(page);
await expect(page.getByText(`127.0.0.1:${daemonPort}`)).toBeVisible();
await expect(page.getByText('Online', { exact: true }).first()).toBeVisible();
await expect(page.getByTestId('daemon-card-e2e-test-daemon').getByText('Online', { exact: true })).toBeVisible();
});
@@ -0,0 +1,29 @@
import { test, expect } from './fixtures';
test('no hosts shows welcome; direct connection adds host and lands on agent create', async ({ page }) => {
const daemonPort = process.env.E2E_DAEMON_PORT;
if (!daemonPort) {
throw new Error('E2E_DAEMON_PORT is not set (expected from globalSetup).');
}
await page.addInitScript(() => {
localStorage.setItem('@paseo:daemon-registry', JSON.stringify([]));
localStorage.removeItem('@paseo:create-agent-preferences');
localStorage.removeItem('@paseo:settings');
});
await page.goto('/');
await expect(page.getByText('Welcome to Paseo', { exact: true })).toBeVisible();
await page.getByText('Direct connection', { exact: true }).click();
await page.getByPlaceholder('My Host').fill('E2E Host');
await page.getByPlaceholder('host:6767').fill(`127.0.0.1:${daemonPort}`);
await page.getByText('Connect & Save', { exact: true }).click();
await expect(page.getByTestId('sidebar-new-agent')).toBeVisible();
await expect(page.getByText('E2E Host', { exact: true })).toBeVisible();
await expect(page.getByText('Online', { exact: true })).toBeVisible({ timeout: 15000 });
});
+5 -5
View File
@@ -14,16 +14,16 @@ test('manual host add accepts host:port only and persists endpoints', async ({ p
await page.goto('/settings');
await page.getByText('+ Add Host', { exact: true }).click();
await page.getByText('Manual', { exact: true }).click();
await page.getByText('Direct connection', { exact: true }).click();
const input = page.getByPlaceholder('localhost:6767');
const input = page.getByPlaceholder('host:6767');
await expect(input).toBeVisible();
await input.fill(`127.0.0.1:${daemonPort}`);
await page.getByText('Add', { exact: true }).click();
await page.getByText('Connect & Save', { exact: true }).click();
await expect(page.getByText(`127.0.0.1:${daemonPort}`, { exact: true }).first()).toBeVisible();
await expect(page.getByText('Online', { exact: true }).first()).toBeVisible({ timeout: 15000 });
await expect(page.getByTestId('sidebar-new-agent')).toBeVisible();
await expect(page.getByText('Online', { exact: true })).toBeVisible({ timeout: 15000 });
await page.waitForFunction(
(port) => {
@@ -35,8 +35,7 @@ test('pairing flow accepts #offer=ConnectionOfferV1 and stores sessionId + endpo
const offerUrl = `https://app.paseo.sh/#offer=${encodeBase64Url(JSON.stringify(offer))}`;
await page.getByText('+ Add Host', { exact: true }).click();
await page.getByText('Pair', { exact: true }).click();
await page.getByText('Paste link', { exact: true }).click();
await page.getByText('Paste pairing link', { exact: true }).click();
const input = page.getByPlaceholder('https://app.paseo.sh/#offer=...');
await expect(input).toBeVisible();
@@ -44,7 +43,7 @@ test('pairing flow accepts #offer=ConnectionOfferV1 and stores sessionId + endpo
await page.getByText('Pair', { exact: true }).click();
await expect(page.getByText(`127.0.0.1:${daemonPort}`, { exact: true })).toBeVisible();
await expect(page.getByTestId('sidebar-new-agent')).toBeVisible();
await page.waitForFunction(
({ expected }) => {