- Wire local embedding provider as the default on startup when no profile is configured - Refactor embedding settings into dedicated service, DTOs, mappers and models - Rebuild settings page with profile management UI and live test feedback - Expose index summary (indexed versions + embedding count) on repo endpoints - Harden indexing pipeline and context search with additional test coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
1019 B
TypeScript
32 lines
1019 B
TypeScript
import { page } from 'vitest/browser';
|
|
import { describe, expect, it, vi } from 'vitest';
|
|
import { render } from 'vitest-browser-svelte';
|
|
import RepositoryCard from './RepositoryCard.svelte';
|
|
|
|
describe('RepositoryCard.svelte', () => {
|
|
it('encodes slash-bearing repository ids in the details href', async () => {
|
|
render(RepositoryCard, {
|
|
repo: {
|
|
id: '/facebook/react',
|
|
title: 'React',
|
|
description: 'A JavaScript library for building user interfaces',
|
|
state: 'indexed',
|
|
totalSnippets: 1234,
|
|
embeddingCount: 1200,
|
|
indexedVersions: ['main', 'v18.3.0'],
|
|
trustScore: 9.7,
|
|
stars: 230000,
|
|
lastIndexedAt: null
|
|
} as never,
|
|
onReindex: vi.fn(),
|
|
onDelete: vi.fn()
|
|
});
|
|
|
|
await expect
|
|
.element(page.getByRole('link', { name: 'Details' }))
|
|
.toHaveAttribute('href', '/repos/%2Ffacebook%2Freact');
|
|
|
|
await expect.element(page.getByText('1,200 embeddings')).toBeInTheDocument();
|
|
await expect.element(page.getByText('Indexed: main, v18.3.0')).toBeInTheDocument();
|
|
});
|
|
}); |