test(admin): enforce direct action contracts
This commit is contained in:
@@ -68,7 +68,7 @@ export default function UsersPage() {
|
||||
}),
|
||||
},
|
||||
);
|
||||
message.success(`已重置 ${user.email},登录身份、管理员角色和积分保持不变`);
|
||||
message.success(`已重置 ${user.email},登录身份、管理员角色、积分及账务审计记录会保留`);
|
||||
setRevealed((current) => {
|
||||
const next = { ...current };
|
||||
delete next[user.id];
|
||||
|
||||
@@ -71,7 +71,9 @@ test("model mutations omit client reasons while the server keeps fixed audit rea
|
||||
assert.doesNotMatch(component, /reauthPermission=[^\n]*models\.|验证并(?:保存|获取)/);
|
||||
assert.match(component, /open=\{providerOpen\} okText="保存"[\s\S]*onFinish=\{saveProvider\}/);
|
||||
assert.doesNotMatch(component, /继续验证/);
|
||||
assert.match(component, /<Modal[\s\S]*open=\{Boolean\(versionAction\)\}[\s\S]*onOk=\{\(\) => void submitVersionAction\(\)\}/);
|
||||
assert.doesNotMatch(component, /versionAction|submitVersionAction/);
|
||||
assert.match(component, /onClick=\{\(\) => void runVersionAction\("publish", item\)\}>发布<\/Button>/);
|
||||
assert.match(component, /onClick=\{\(\) => void runVersionAction\("rollback", item\)\}>回滚到此版<\/Button>/);
|
||||
|
||||
assert.doesNotMatch(route, /reason:\s*z\.string/);
|
||||
for (const reason of ["保存模型供应商", "保存模型草稿", "发布模型版本", "回滚模型版本"]) {
|
||||
|
||||
Reference in New Issue
Block a user