feat(channels): add inherited global compaction notice policy
This commit is contained in:
1 parent
7644d845b4
commit
ab6d5f1d3c
35 files changed
+287
-37
No files matched your search
@@ -24,6 +24,32 @@ function feature(overrides: Partial<NanobotFeatureInfo>): NanobotFeatureInfo {
|
||||
}
|
||||
|
||||
describe("channelSetup", () => {
|
||||
it("offers a localized inherited option without changing ordinary booleans", () => {
|
||||
const setup = channelSetup(feature({ setup: { fields: [
|
||||
{
|
||||
key: "channels.plugin-chat.showCompactionNotices",
|
||||
field: "showCompactionNotices",
|
||||
kind: "bool",
|
||||
choices: [],
|
||||
required: false,
|
||||
inheritable: true,
|
||||
},
|
||||
{
|
||||
key: "channels.plugin-chat.sendProgress",
|
||||
field: "sendProgress",
|
||||
kind: "bool",
|
||||
choices: [],
|
||||
required: false,
|
||||
},
|
||||
] } }), "zh-CN");
|
||||
expect(setup.fields?.[0]?.options).toEqual([
|
||||
{ value: "", label: "默认" },
|
||||
{ value: "true", label: "True" },
|
||||
{ value: "false", label: "False" },
|
||||
]);
|
||||
expect(setup.fields?.[1]?.options?.map((option) => option.value)).toEqual(["true", "false"]);
|
||||
});
|
||||
|
||||
it("builds editable fields for a plugin-owned backend contract", () => {
|
||||
const setup = channelSetup(feature({
|
||||
setup: {
|
||||
|
||||
Reference in new issue
Block a user