Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export default defineConfig({
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : 'list',
// The dev server transforms lazily-imported route modules on demand, so the
// first assertion after navigating to a lazy route races that waterfall. On a
// shared CI runner it has measured over 3.5s from document to the component
// that owns the heading, which overruns the 5s default.
expect: { timeout: process.env.CI ? 15_000 : 5_000 },
use: {
baseURL,
trace: 'retain-on-failure',
Expand Down
26 changes: 0 additions & 26 deletions src/hooks/use-keyboard-shortcuts.ts

This file was deleted.

35 changes: 0 additions & 35 deletions src/hooks/use-resolved-theme.ts

This file was deleted.

165 changes: 0 additions & 165 deletions src/lib/ai/prompts/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/ai/providers/mock-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,5 +508,3 @@ export async function mockJudgeSparringSession(input: SparringScoreInput): Promi
}

// Names kept short for callers that treat the mock provider as a feature adapter.
export const mockSparringResponse = mockGenerateSparringTurn;
export const mockSparringScore = mockJudgeSparringSession;
5 changes: 0 additions & 5 deletions src/lib/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ export function isNativeApp(): boolean {
return Capacitor.isNativePlatform();
}

export function getAppRedirectUrl(path = '/app'): string {
if (isNativeApp()) return `${NATIVE_URL_SCHEME}://${path.replace(/^\/+/, '')}`;
return `${window.location.origin}${path}`;
}

export function getWebAppRedirectUrl(path = '/app'): string {
const origin = isNativeApp() ? PUBLIC_WEB_APP_ORIGIN : window.location.origin;
return `${origin}${path}`;
Expand Down
8 changes: 0 additions & 8 deletions src/lib/validation/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,3 @@ export function validateUrl(url?: string): string | undefined {
return undefined;
}
}

/**
* Checks if a URL is safe without normalizing it.
* Useful for validation-only scenarios.
*/
export function isUrlSafe(url?: string): boolean {
return validateUrl(url) !== undefined;
}
7 changes: 0 additions & 7 deletions src/test/example.test.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/test/export-utils-extended.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,29 +225,4 @@ describe('Export Utils - Extended', () => {
});
});

describe('PDF export functions exist', () => {
it('exportCaseToDocx is a function', () => {
expect(typeof exportCaseToDocx).toBe('function');
});

it('exportAttackToDocx is a function', () => {
expect(typeof exportAttackToDocx).toBe('function');
});

it('exportBrainstormToDocx is a function', () => {
expect(typeof exportBrainstormToDocx).toBe('function');
});

it('exportFactoidsToDocx is a function', () => {
expect(typeof exportFactoidsToDocx).toBe('function');
});

it('exportCaseToGoogleDocs is a function', () => {
expect(typeof exportCaseToGoogleDocs).toBe('function');
});

it('exportBrainstormToGoogleDocs is a function', () => {
expect(typeof exportBrainstormToGoogleDocs).toBe('function');
});
});
});
30 changes: 1 addition & 29 deletions src/test/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ describe('i18n locale files', () => {
const esKeys = flattenKeys(es);
const huKeys = flattenKeys(hu);

it('en.json has keys', () => {
expect(enKeys.length).toBeGreaterThan(0);
});

it('es.json has keys', () => {
expect(esKeys.length).toBeGreaterThan(0);
});

it('hu.json has keys', () => {
expect(huKeys.length).toBeGreaterThan(0);
});

it('all 3 locale files have same number of keys', () => {
expect(enKeys.length).toBe(esKeys.length);
expect(enKeys.length).toBe(huKeys.length);
});

it('all keys in en.json exist in es.json', () => {
const esKeySet = new Set(esKeys);
const missing = enKeys.filter(k => !esKeySet.has(k));
Expand Down Expand Up @@ -100,15 +83,9 @@ describe('i18n locale files', () => {
});

describe('i18n runtime', () => {
it('i18n.t returns correct English value for nav.home', () => {
it('i18n.t resolves English nav values', () => {
expect(i18n.t('nav.home')).toBe('Home');
});

it('i18n.t returns correct English value for nav.generate', () => {
expect(i18n.t('nav.generate')).toBe('Generate');
});

it('i18n.t returns correct English value for nav.settings', () => {
expect(i18n.t('nav.settings')).toBe('Settings');
});

Expand All @@ -124,11 +101,6 @@ describe('i18n runtime', () => {
await i18n.changeLanguage('en');
});

it('i18n.changeLanguage back to en', async () => {
await i18n.changeLanguage('en');
expect(i18n.language).toBe('en');
});

it('interpolation works for limitModal.limitReachedDesc', () => {
const result = i18n.t('limitModal.limitReachedDesc', { current: 5, limit: 10 });
expect(result).toContain('5');
Expand Down
5 changes: 0 additions & 5 deletions src/test/pages/HistoryPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,4 @@ describe('HistoryPage', () => {
const { container } = render(<HistoryPage />);
expect(container.querySelector('.max-w-5xl')).not.toBeNull();
});

it('renders without crashing with empty arrays', () => {
const { container } = render(<HistoryPage />);
expect(container).toBeDefined();
});
});
Loading
Loading