Add projects

This commit is contained in:
Alois 2026-08-24 00:10:41 +02:00
commit 8b607dd700
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
1802 changed files with 503346 additions and 2 deletions

View file

@ -0,0 +1,53 @@
import { describe, expect, test } from 'vitest';
import { createElement } from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import '../src/i18n/index';
import { OAuthExcludedCard } from '../src/features/authFiles/components/OAuthExcludedCard';
import { OAuthModelAliasCard } from '../src/features/authFiles/components/OAuthModelAliasCard';
const noop = () => {};
const noopAsync = async () => {};
describe('OAuth configuration load guards', () => {
test('disables excluded-model writes and exposes retry after a load failure', () => {
const markup = renderToStaticMarkup(
createElement(OAuthExcludedCard, {
disableControls: false,
excludedError: 'load',
excluded: {},
onRetry: noop,
onAdd: noop,
onEdit: noop,
onDelete: noop,
})
);
expect(markup).toContain('disabled=""');
expect(markup).toContain('empty-action');
});
test('disables model-alias writes and exposes retry after a load failure', () => {
const markup = renderToStaticMarkup(
createElement(OAuthModelAliasCard, {
disableControls: false,
viewMode: 'list',
onViewModeChange: noop,
onRetry: noop,
onAdd: noop,
onEditProvider: noop,
onDeleteProvider: noop,
modelAliasError: 'load',
modelAlias: {},
allProviderModels: {},
onUpdate: noopAsync,
onDeleteLink: noop,
onToggleFork: noopAsync,
onRenameAlias: noopAsync,
onDeleteAlias: noop,
})
);
expect(markup).toContain('disabled=""');
expect(markup).toContain('empty-action');
});
});