chore: hide export range selector
This commit is contained in:
@@ -324,7 +324,17 @@ describe("market-content-entry", () => {
|
||||
expect(document.querySelector('[data-plugin-sort-field="select"]')).toBeNull();
|
||||
|
||||
expect(document.body.firstElementChild).not.toBe(toolbar);
|
||||
expect(document.querySelector('[data-plugin-export-range="select"]')).not.toBeNull();
|
||||
expect(
|
||||
(document.querySelector('[data-plugin-export-range="select"]') as HTMLSelectElement | null)
|
||||
?.hidden
|
||||
).toBe(true);
|
||||
expect(
|
||||
(
|
||||
document.querySelector(
|
||||
'[data-plugin-export-custom-pages="input"]'
|
||||
) as HTMLInputElement | null
|
||||
)?.hidden
|
||||
).toBe(true);
|
||||
expect(
|
||||
(document.querySelector('[data-plugin-export="button"]') as HTMLButtonElement | null)
|
||||
?.hidden
|
||||
@@ -1123,7 +1133,7 @@ describe("market-content-entry", () => {
|
||||
expect(readDivAuthorOrder()).toEqual(["达人 B", "达人 A"]);
|
||||
});
|
||||
|
||||
test("toolbar defaults export range to the first 5 pages and reveals custom input on demand", async () => {
|
||||
test("toolbar keeps export range controls hidden while retaining the internal default range", async () => {
|
||||
document.body.innerHTML = buildMarketFixture();
|
||||
|
||||
const { createMarketController } = await import("../src/content/market/index");
|
||||
@@ -1146,6 +1156,7 @@ describe("market-content-entry", () => {
|
||||
) as HTMLInputElement | null;
|
||||
|
||||
expect(exportRangeSelect?.value).toBe("first-5");
|
||||
expect(exportRangeSelect?.hidden).toBe(true);
|
||||
expect(customPagesInput?.hidden).toBe(true);
|
||||
expect(
|
||||
document.querySelector('[data-plugin-batch-submit="button"]')
|
||||
@@ -1154,7 +1165,8 @@ describe("market-content-entry", () => {
|
||||
setSelectValue('[data-plugin-export-range="select"]', "custom");
|
||||
dispatchChange('[data-plugin-export-range="select"]');
|
||||
|
||||
expect(customPagesInput?.hidden).toBe(false);
|
||||
expect(exportRangeSelect?.hidden).toBe(true);
|
||||
expect(customPagesInput?.hidden).toBe(true);
|
||||
});
|
||||
|
||||
test("export uses the current page ordering without triggering a full scan", async () => {
|
||||
|
||||
Reference in New Issue
Block a user