From 57319e6712d12fcad594fd1872fe92ea95be5ed8 Mon Sep 17 00:00:00 2001 From: Albert Date: Mon, 10 Nov 2025 17:35:47 +0000 Subject: [PATCH] fix: Replace remaining agent.open() calls in voice and cache tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed agent.open() in: - tests/magnitude/09-voice.mag.ts (4 instances) - tests/magnitude/cache-success.mag.ts (1 instance) All Magnitude tests now use the correct agent.act('Navigate to...') API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tests/magnitude/09-voice.mag.ts | 8 ++++---- tests/magnitude/cache-success.mag.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/magnitude/09-voice.mag.ts b/tests/magnitude/09-voice.mag.ts index 83dd066..e20bf99 100644 --- a/tests/magnitude/09-voice.mag.ts +++ b/tests/magnitude/09-voice.mag.ts @@ -2,7 +2,7 @@ import { test } from 'magnitude-test'; test('[Happy Path] User can have a full voice conversation with AI', async (agent) => { // Act: Navigate to chat page (assumes user is already authenticated) - await agent.open('http://localhost:3000/chat'); + await agent.act('Navigate to http://localhost:3000/chat'); // Check: Initial state - voice button shows "Start Voice Conversation" await agent.check('A button with text "Start Voice Conversation" is visible'); @@ -76,7 +76,7 @@ test('[Happy Path] User can have a full voice conversation with AI', async (agen }); test('[Unhappy Path] Voice mode handles errors gracefully', async (agent) => { - await agent.open('http://localhost:3000/chat'); + await agent.act('Navigate to http://localhost:3000/chat'); // Act: Start voice mode await agent.act('Click the "Start Voice Conversation" button'); @@ -93,7 +93,7 @@ test('[Unhappy Path] Voice mode handles errors gracefully', async (agent) => { }); test('[Happy Path] Text input is disabled during voice mode', async (agent) => { - await agent.open('http://localhost:3000/chat'); + await agent.act('Navigate to http://localhost:3000/chat'); // Check: Text input is enabled initially await agent.check('The text input field "Or type your thoughts here..." is enabled'); @@ -112,7 +112,7 @@ test('[Happy Path] Text input is disabled during voice mode', async (agent) => { }); test('[Happy Path] User can type a message while voice mode is idle', async (agent) => { - await agent.open('http://localhost:3000/chat'); + await agent.act('Navigate to http://localhost:3000/chat'); // Act: Type a message in the text input await agent.act('Type "This is a text message" into the text input field'); diff --git a/tests/magnitude/cache-success.mag.ts b/tests/magnitude/cache-success.mag.ts index 8569bf5..9d36467 100644 --- a/tests/magnitude/cache-success.mag.ts +++ b/tests/magnitude/cache-success.mag.ts @@ -8,7 +8,7 @@ import { test } from 'magnitude-test'; test('Node publishes successfully with cache (no warnings)', async (agent) => { - await agent.open('http://localhost:3000'); + await agent.act('Navigate to http://localhost:3000'); // Login await agent.act('Click the "Log in with Bluesky" button');