fix(admin): reauthenticate model discovery
This commit is contained in:
@@ -19,8 +19,10 @@ test("provider form keeps codes server-owned and API keys write-only", () => {
|
||||
});
|
||||
|
||||
test("model discovery stays searchable with a manual provider model fallback", () => {
|
||||
assert.match(component, /onClick=\{\(\) => setDiscoverProviderId\(selectedProviderId\)\}>获取模型列表<\/Button>/);
|
||||
assert.match(component, /title="获取供应商模型列表"[\s\S]*reauthPermission="models\.test"[\s\S]*onSubmit=\{discoverModels\}/);
|
||||
assert.match(component, /adminRequestJson<DiscoveredModelsPayload>\("\/api\/admin\/models\/discover"/);
|
||||
assert.match(component, /body: JSON\.stringify\(\{ providerId: selectedProviderId \}\)/);
|
||||
assert.match(component, /body: JSON\.stringify\(\{ providerId: discoverProviderId \}\)/);
|
||||
assert.match(component, /获取模型列表/);
|
||||
assert.match(component, /<Select[\s\S]*showSearch[\s\S]*optionFilterProp="label"[\s\S]*onSelect=\{selectDiscoveredModel\}/);
|
||||
assert.match(component, /name="providerModel" label="供应商模型名(可手工输入)"/);
|
||||
|
||||
Reference in New Issue
Block a user