- Target Commit SHA:
178f3b2c6cebe1a7ab76553574b5a8e6f9d4b283 - Target Pull Request: https://github.com/YonatanKra/fantasy-empires-web/pull/319
- Agent Host Environment: macOS Darwin arm64 (Apple Silicon)
- Host Runtime: Google Antigravity / Gemini 3.8 Flash Native Agent
- Timestamp: 2026-11-02T12:10:00Z
- Manifest Integrity Hash:
6c100ce6207459dfda6b7c3d1e236c84088d444c2d7d8f4f0c8c2af611f31a1d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testWidgets('should display a WordPair and update on button press', (WidgetTester tester) async { | |
| await tester.pumpWidget( | |
| ChangeNotifierProvider( | |
| create: (context) => MyAppState(), | |
| child: MaterialApp(home: MyHomePage()), | |
| ), | |
| ); | |
| // Verify initial WordPair is displayed | |
| expect(find.textContaining('_'), findsOneWidget); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String? getBigCardText(WidgetTester tester) { | |
| final bigCard = find.byType(BigCard); | |
| // Find the Text widget inside the BigCard | |
| final textWidget = find.descendant( | |
| of: bigCard, | |
| matching: find.byType(Text), | |
| ); | |
| // Get the actual text content from the rendered widget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testWidgets('should display “mock_first” in a big card', ( WidgetTester tester, ) async { | |
| await tester.pumpWidget( | |
| ChangeNotifierProvider<MyAppState>( | |
| create: (context) => MockAppState(), | |
| child: MaterialApp(home: MyHomePage()), | |
| ), | |
| ); | |
| expect(getBigCardText(tester), equals('mock_first')); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testWidgets(‘should display “mock_first” text’, (WidgetTester tester) async { | |
| await tester.pumpWidget( | |
| ChangeNotifierProvider<MyAppState>( | |
| create: (context) => MockAppState(), | |
| child: MaterialApp(home: MyHomePage()), | |
| ), | |
| ); | |
| expect(find.text(‘mock_first’), findsOneWidget); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('should send parsed output to the callback', async () => { | |
| queueAgentFeedResponse(fullFeedResponseWithAlt); | |
| queueAgentFeedResponse(fullFeedLastResponse); | |
| const spy = vi.fn(); | |
| await bot.run(handle, 'password', spy); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('run()', () => { | |
| it('should fire the callback on every streaming event', async () => { | |
| queueAgentFeedResponse(fullFeedResponse); | |
| queueAgentFeedResponse(fullFeedLastResponse); | |
| const spy = vi.fn(); | |
| await bot.run(handle, 'password', spy); | |
| expect(spy).toHaveBeenCalledTimes(2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async streamPosts(handle: string, onUpdate: (results: any) => any) { | |
| while (true) { | |
| try { | |
| const result = await this.#agent.getAuthorFeed({ | |
| actor: handle, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('should stream posts with done set to false when cursor is truthy', async () => { | |
| const spy = vi.fn(); | |
| queueAgentFeedResponse(fullFeedResponse); | |
| queueAgentFeedResponse(fullFeedResponse); | |
| queueAgentFeedResponse(fullFeedLastResponse); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('checkSinglePost()', () => { | |
| it('should return the error message if fetch post failed', async () => { | |
| resetAtpAgentMock(); | |
| const postUri = 'postUri'; | |
| const bot = new AltTextBot(); | |
| const error = { message: 'error' }; | |
| mockAtpAgent.getPost.mockRejectedValue(error); | |
| const result = await bot.checkSinglePost(postUri); |
NewerOlder