style: simplify spread threshold controls

This commit is contained in:
wxs
2026-06-30 18:07:40 +08:00
parent 4c66262211
commit b4440e2ca3
2 changed files with 18 additions and 51 deletions
+10 -6
View File
@@ -463,12 +463,7 @@ describe("market-content-entry", () => {
]);
expect(titles[0]?.style.background).toBe("rgb(238, 245, 255)");
expect(titles[1]?.style.background).toBe("rgb(238, 245, 255)");
expect(
document.querySelector("[data-plugin-spread-threshold-rule]")?.textContent
).toContain("全部满足AND");
expect(
document.querySelector("[data-plugin-spread-threshold-rule]")?.textContent
).toContain("每项取值 >= 输入值");
expect(document.querySelector("[data-plugin-spread-threshold-rule]")).toBeNull();
expect(operators).toEqual(["≥", "≥", "≥", "≥", "≥", "≥", "≥"]);
expect(conjunctions).toEqual(["且", "且", "且", "且", "且", "且"]);
expect(thresholdInputs.map((input) => input.placeholder)).toEqual([
@@ -480,6 +475,15 @@ describe("market-content-entry", () => {
"",
""
]);
expect(thresholdInputs.map((input) => input.step)).toEqual([
"1",
"1",
"1",
"1",
"0.1",
"0.1",
"1"
]);
expect(thresholdControls.map((control) => control.textContent)).toEqual([
"评论≥条",
"时长≥秒",