From efe9b4b93658866d913b95d323629aefc982ce93 Mon Sep 17 00:00:00 2001 From: lzt404 <2596933790@qq.com> Date: Sun, 20 Sep 2026 13:44:22 +0800 Subject: [PATCH] test: fix auth button and localization assertions --- tests/operationFeedback.test.ts | 2 +- tests/uiLocalization.test.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/operationFeedback.test.ts b/tests/operationFeedback.test.ts index 2b9f037..434ab7e 100644 --- a/tests/operationFeedback.test.ts +++ b/tests/operationFeedback.test.ts @@ -56,7 +56,7 @@ describe('控件自身反馈', () => { visit(source); const attributes = button?.attributes.properties.filter(ts.isJsxAttribute); expect(attributes?.find((attribute) => attribute.name.getText(source) === 'className')?.initializer?.getText(source)) - .toBe("{`${disabled ? 'primary-button' : 'secondary-button'} compact-button`}"); + .toBe("{`${disabled ? 'primary-button' : 'secondary-button'} compact-button auth-card-toggle`}"); expect(attributes?.find((attribute) => attribute.name.getText(source) === 'disabled')?.initializer?.getText(source)) .toBe('{busy}'); const styles = readFileSync(new URL('../src/styles.css', import.meta.url), 'utf8'); diff --git a/tests/uiLocalization.test.ts b/tests/uiLocalization.test.ts index d845aa9..2cc9c21 100644 --- a/tests/uiLocalization.test.ts +++ b/tests/uiLocalization.test.ts @@ -5,7 +5,17 @@ import { fileURLToPath } from 'node:url'; import ts from 'typescript'; const sourceRoot = fileURLToPath(new URL('../src/', import.meta.url)); -const technicalText = new Set(['EasyCLIProxyAPI', 'WebSocket', 'Fast', 'ms', 'auto']); +const technicalText = new Set([ + 'EasyCLIProxyAPI', + 'WebSocket', + 'Fast', + 'HTTP', + 'auto', + 'excluded_models', + 'headers', + 'ms', + 'note', +]); const technicalPlaceholders = new Set(['1h', 'sk-...', 'gpt-5.6-terra', 'https://...']); function componentFiles(directory: string): string[] {