release: bump version to 0.74.5
This commit is contained in:
@@ -1232,7 +1232,7 @@ async function runAdminInteractionChecks(browser, failures, consoleErrors) {
|
||||
await page.goto(urlFor('/ai?section=integrations'), { waitUntil: 'domcontentloaded' })
|
||||
await expectVisibleText(page, 'LLM 基础地址', 'connection test input ai provider')
|
||||
await clickFirstVisible(page.locator('.an-connection-test-input button'), 'connection test input ai provider')
|
||||
await expectVisibleText(page, 'AI Provider连通性正常', 'connection test input ai provider')
|
||||
await expectVisibleText(page, 'AI 提供方连通性正常', 'connection test input ai provider')
|
||||
|
||||
await page.goto(urlFor('/ai?section=tools'), { waitUntil: 'domcontentloaded' })
|
||||
await clickFirstVisible(page.getByRole('button', { name: /tavily/i }), 'connection test input websearch provider')
|
||||
@@ -1339,14 +1339,19 @@ async function runAIModelCatalogChecks(browser, failures, consoleErrors) {
|
||||
await seedAuthenticatedState(page)
|
||||
let models = ['MiniMax-M2.7']
|
||||
let failRefresh = false
|
||||
let failListing = false
|
||||
let refreshBody = null
|
||||
let integrationWrites = 0
|
||||
page.on('request', (request) => {
|
||||
if (request.method() === 'PUT' && new URL(request.url()).pathname.endsWith('/settings/integrations')) integrationWrites += 1
|
||||
})
|
||||
await page.route('**/settings/integrations/ai-provider/presets**', async (route) => {
|
||||
if (route.request().method() === 'POST') {
|
||||
refreshBody = route.request().postDataJSON()
|
||||
if (failRefresh) return route.fulfill(jsonResponse({ detail: '模型列表刷新失败,已保留上次模型列表。' }, 502))
|
||||
models = ['MiniMax-M3', 'MiniMax-M2.7']
|
||||
} else if (failListing) {
|
||||
return route.fulfill(jsonResponse({ detail: 'Catalog unavailable' }, 500))
|
||||
}
|
||||
const preset = { provider: 'minimax', label: 'MiniMax', model: models[0], models, provider_api: 'anthropic-messages' }
|
||||
await route.fulfill(jsonResponse({ data: route.request().method() === 'POST' ? preset : [preset] }))
|
||||
@@ -1365,6 +1370,8 @@ async function runAIModelCatalogChecks(browser, failures, consoleErrors) {
|
||||
await page.getByRole('button', { name: /刷新当前.*模型配置/ }).click()
|
||||
await page.getByRole('button', { name: 'MiniMax-M3', exact: true }).waitFor({ state: 'visible' })
|
||||
for (const [label, value] of Object.entries(drafts)) assert.equal(await page.getByLabel(label, { exact: true }).inputValue(), value, `${label} draft was overwritten`)
|
||||
assert.equal(refreshBody.base_url, drafts['LLM 基础地址'], 'refresh must use the draft endpoint')
|
||||
assert.equal(refreshBody.api_key, drafts['LLM API Key'], 'refresh must use the draft credential')
|
||||
assert.equal(integrationWrites, 0, 'catalog refresh must not save runtime settings')
|
||||
await page.getByRole('button', { name: 'MiniMax-M3', exact: true }).click()
|
||||
assert.equal(await page.getByLabel('默认模型', { exact: true }).inputValue(), 'MiniMax-M3')
|
||||
@@ -1381,6 +1388,11 @@ async function runAIModelCatalogChecks(browser, failures, consoleErrors) {
|
||||
await expectVisibleText(page, '模型列表刷新失败,已保留上次模型列表。', 'catalog failure')
|
||||
assert.equal(await page.getByRole('button', { name: 'MiniMax-M3', exact: true }).count(), 1)
|
||||
assert.equal(await page.locator('.an-toast--success').count(), 0, 'failed refresh must not claim success')
|
||||
failRefresh = false
|
||||
failListing = true
|
||||
await page.getByRole('button', { name: /刷新当前.*模型配置/ }).click()
|
||||
await expectVisibleText(page, '模型列表加载失败,请重试;已加载的模型列表会保留。', 'catalog listing failure')
|
||||
assert.equal(await page.getByRole('button', { name: 'MiniMax-M3', exact: true }).count(), 1, 'listing failure must preserve models')
|
||||
await checkNoFrameworkOverlay(page, 'AI catalog refresh')
|
||||
await checkNoGlobalHorizontalOverflow(page, 'AI catalog refresh')
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user