mirror of
https://github.com/cita-777/metapi.git
synced 2026-11-02 21:38:32 +08:00
- Implement tests for the CenteredModal component to ensure it follows the shared modal shell pattern. - Add comprehensive tests for the SearchModal results, including API interactions and UI behavior. - Create tests for accounts batch actions, verifying the functionality of refreshing balances and selecting accounts via row clicks. - Introduce tests for the accounts centered modal to confirm the use of CenteredModal for add/edit/rebind flows. - Add tests for the accounts edit panel to ensure proper rendering and functionality when opening the edit modal. - Implement tests for the accounts tokens header to verify the reuse of the accounts page header in the tokens segment. - Create tests for the system proxy settings, ensuring the correct saving of the proxy URL. - Add tests for the tokens actions layout to confirm the proper layout and styling of token row actions. - Implement tests for the tokens batch actions, including deletion of selected tokens and row selection behavior. - Introduce tests for the tokens focus navigation to ensure the correct highlighting of focused token rows.
14 lines
576 B
TypeScript
14 lines
576 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { readFileSync } from 'node:fs';
|
|
import { resolve } from 'node:path';
|
|
|
|
describe('App sidebar config', () => {
|
|
it('uses 连接管理 for /accounts and removes standalone /tokens navigation item', () => {
|
|
const source = readFileSync(resolve(process.cwd(), 'src/web/App.tsx'), 'utf8');
|
|
|
|
expect(source).toContain("{ to: '/accounts', label: '连接管理'");
|
|
expect(source).not.toContain("{ to: '/accounts', label: '账号'");
|
|
expect(source).not.toContain("{ to: '/tokens', label: '令牌管理'");
|
|
});
|
|
});
|