Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
c5a1a822
"backend/vscode:/vscode.git/clone" did not exist on "24e16b7f599eba35e180ae2e53b5e042775a6421"
Commit
c5a1a822
authored
Apr 27, 2026
by
KnowSky404
Browse files
test: cover missing OpenAI bulk edit fields
parent
2ab6b34f
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/account/__tests__/BulkEditAccountModal.spec.ts
View file @
c5a1a822
...
@@ -178,6 +178,45 @@ describe('BulkEditAccountModal', () => {
...
@@ -178,6 +178,45 @@ describe('BulkEditAccountModal', () => {
expect
(
wrapper
.
find
(
'
#bulk-edit-openai-ws-mode-enabled
'
).
exists
()).
toBe
(
false
)
expect
(
wrapper
.
find
(
'
#bulk-edit-openai-ws-mode-enabled
'
).
exists
()).
toBe
(
false
)
})
})
it
(
'
OpenAI OAuth 批量编辑应提交 codex_cli_only 字段
'
,
async
()
=>
{
const
wrapper
=
mountModal
({
selectedPlatforms
:
[
'
openai
'
],
selectedTypes
:
[
'
oauth
'
]
})
await
wrapper
.
get
(
'
#bulk-edit-openai-codex-cli-only-enabled
'
).
setValue
(
true
)
await
wrapper
.
get
(
'
#bulk-edit-openai-codex-cli-only-toggle
'
).
trigger
(
'
click
'
)
await
wrapper
.
get
(
'
#bulk-edit-account-form
'
).
trigger
(
'
submit.prevent
'
)
await
flushPromises
()
expect
(
adminAPI
.
accounts
.
bulkUpdate
).
toHaveBeenCalledTimes
(
1
)
expect
(
adminAPI
.
accounts
.
bulkUpdate
).
toHaveBeenCalledWith
([
1
,
2
],
{
extra
:
{
codex_cli_only
:
true
}
})
})
it
(
'
OpenAI API Key 批量编辑应提交 API Key 专属 WS mode 字段
'
,
async
()
=>
{
const
wrapper
=
mountModal
({
selectedPlatforms
:
[
'
openai
'
],
selectedTypes
:
[
'
apikey
'
]
})
await
wrapper
.
get
(
'
#bulk-edit-openai-apikey-ws-mode-enabled
'
).
setValue
(
true
)
await
wrapper
.
get
(
'
[data-testid="bulk-edit-openai-apikey-ws-mode-select"]
'
).
setValue
(
'
ctx_pool
'
)
await
wrapper
.
get
(
'
#bulk-edit-account-form
'
).
trigger
(
'
submit.prevent
'
)
await
flushPromises
()
expect
(
adminAPI
.
accounts
.
bulkUpdate
).
toHaveBeenCalledTimes
(
1
)
expect
(
adminAPI
.
accounts
.
bulkUpdate
).
toHaveBeenCalledWith
([
1
,
2
],
{
extra
:
{
openai_apikey_responses_websockets_v2_mode
:
'
ctx_pool
'
,
openai_apikey_responses_websockets_v2_enabled
:
true
}
})
})
it
(
'
OpenAI 账号批量编辑可关闭自动透传
'
,
async
()
=>
{
it
(
'
OpenAI 账号批量编辑可关闭自动透传
'
,
async
()
=>
{
const
wrapper
=
mountModal
({
const
wrapper
=
mountModal
({
selectedPlatforms
:
[
'
openai
'
],
selectedPlatforms
:
[
'
openai
'
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment