aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/FeedItem.test.tsx
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 09:58:11 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 09:58:11 -0800
commitc9c3469ce90f5e1cf624a9a97d66fd6db3aba8cb (patch)
treedfc78feec1eff6cc5411b511123e6eefbdaf625b /frontend/src/components/FeedItem.test.tsx
parentae2b06f7a702ea432b801985f534ade405d0299a (diff)
downloadneko-c9c3469ce90f5e1cf624a9a97d66fd6db3aba8cb.tar.gz
neko-c9c3469ce90f5e1cf624a9a97d66fd6db3aba8cb.tar.bz2
neko-c9c3469ce90f5e1cf624a9a97d66fd6db3aba8cb.zip
feature: add scrape full text button to feed items (fixing NK-8hu7z1)
Diffstat (limited to 'frontend/src/components/FeedItem.test.tsx')
-rw-r--r--frontend/src/components/FeedItem.test.tsx18
1 files changed, 18 insertions, 0 deletions
diff --git a/frontend/src/components/FeedItem.test.tsx b/frontend/src/components/FeedItem.test.tsx
index cb9aafa..4c7d887 100644
--- a/frontend/src/components/FeedItem.test.tsx
+++ b/frontend/src/components/FeedItem.test.tsx
@@ -71,4 +71,22 @@ describe('FeedItem Component', () => {
expect(listItem).toHaveClass('read');
expect(listItem).not.toHaveClass('unread');
});
+
+ it('loads full content', async () => {
+ (global.fetch as any).mockResolvedValueOnce({
+ ok: true,
+ json: async () => ({ ...mockItem, full_content: '<p>Full Content Loaded</p>' }),
+ });
+
+ render(<FeedItem item={mockItem} />);
+
+ const scrapeBtn = screen.getByTitle('Load Full Content');
+ fireEvent.click(scrapeBtn);
+
+ await waitFor(() => {
+ expect(screen.getByText('Full Content Loaded')).toBeInTheDocument();
+ });
+
+ expect(global.fetch).toHaveBeenCalledWith('/api/item/1', expect.anything());
+ });
});