Files
app/tests/magnitude/cache-success.mag.ts
Albert 57319e6712
Some checks failed
Magnitude Tests / test (push) Failing after 1m4s
fix: Replace remaining agent.open() calls in voice and cache tests
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 <noreply@anthropic.com>
2025-11-10 17:35:47 +00:00

38 lines
1.4 KiB
TypeScript

/**
* Magnitude Test: Cache Success
*
* This test verifies that node publishing succeeds with full cache write,
* not just a degraded state with warnings.
*/
import { test } from 'magnitude-test';
test('Node publishes successfully with cache (no warnings)', async (agent) => {
await agent.act('Navigate to http://localhost:3000');
// Login
await agent.act('Click the "Log in with Bluesky" button');
await agent.act('Fill in credentials and submit')
.data({
username: process.env.TEST_BLUESKY_USERNAME || 'test-user.bsky.social',
password: process.env.TEST_BLUESKY_PASSWORD || 'test-password',
});
await agent.check('Logged in successfully');
// Start conversation
await agent.act('Type "Test cache write success" and press Enter');
await agent.check('AI responds');
// Create and publish node
await agent.act('Click "Create Node"');
await agent.check('On edit page with draft');
await agent.act('Click "Publish Node"');
// CRITICAL: Should get green success notification, NOT yellow warning
await agent.check('Success notification is GREEN (not yellow warning)');
await agent.check('Notification says "Your node has been published to your Bluesky account"');
await agent.check('Notification does NOT mention "cache update failed"');
await agent.check('Notification does NOT mention "Advanced features may be unavailable"');
});