Skip to content

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

test(e2e): enhance test logging and simplify sign-in flow

Steven Enamakel22cbd45b3e5c
diff --git a/app/test/playwright/specs/guided-tour-gates.spec.ts b/app/test/playwright/specs/guided-tour-gates.spec.ts
index 1fe5dbd9ee..93c7ecc1db 100644
--- a/app/test/playwright/specs/guided-tour-gates.spec.ts
+++ b/app/test/playwright/specs/guided-tour-gates.spec.ts
@@ -42,6 +42,13 @@ test.describe('Guided tour gates', () => {
});
test('follows the current seven-step route and ends with its seeded welcome note', async ({ page }) => {
+ page.on('console', async message => {
+ if (!message.text().includes('[walkthrough] event')) return;
+ const args = await Promise.all(
+ message.args().map(argument => argument.jsonValue().catch(() => message.text()))
+ );
+ console.log(`[tour-event] ${JSON.stringify(args)}`);
+ });
await armWalkthrough(page);
const steps = [
diff --git a/app/test/playwright/specs/logout-relogin-onboarding.spec.ts b/app/test/playwright/specs/logout-relogin-onboarding.spec.ts
index 1eded47823..0486a297d0 100644
--- a/app/test/playwright/specs/logout-relogin-onboarding.spec.ts
+++ b/app/test/playwright/specs/logout-relogin-onboarding.spec.ts
@@ -38,11 +38,7 @@ async function readOnboardingCompleted(): Promise<boolean> {
* onboarding screen to wait for. Callers assert the landing instead.
*/
async function signInThroughOnboarding(page: Page, userId: string): Promise<void> {
- const payload = Buffer.from(
- JSON.stringify({ sub: userId, userId, exp: Math.floor(Date.now() / 1000) + 3600 })
- ).toString('base64url');
- const token = `eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.${payload}.sig`;
- await callCoreRpc('openhuman.auth_store_session', { token });
+ await signInViaBypassUser(page, userId);
await callCoreRpc('openhuman.config_set_onboarding_completed', { value: false });
await page.goto('/#/onboarding/welcome');
await waitForAppReady(page);