test: fix auth button and localization assertions
This commit is contained in:
1 parent
100f5df737
commit
efe9b4b936
2 files changed
+12
-2
No files matched your search
@@ -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');
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in new issue
Block a user