diff --git a/app/boot.js b/app/boot.js index 34d35caf..c8acb3d7 100644 --- a/app/boot.js +++ b/app/boot.js @@ -151,7 +151,7 @@ async function start() { // 5" while two of the five were never going to run reads as a wrong // number, not as a batch that respected the exclude. const scenes = project.scenes.filter((s) => !s.excluded); - if (!scenes.length) return; + if (!scenes.length) { page.transport.say("Every scene is excluded -- nothing to generate."); return; } generateAllBtn.setDisabled(true); batchCancelled = false; page.transport.hold(`Generating scene 1 of ${scenes.length}…`); diff --git a/app/tests-layout/generate_all.spec.js b/app/tests-layout/generate_all.spec.js index cee42ab6..b24c96e6 100644 --- a/app/tests-layout/generate_all.spec.js +++ b/app/tests-layout/generate_all.spec.js @@ -87,6 +87,24 @@ test("an excluded scene is skipped, and does not count toward the total", async .toBeVisible({ timeout: 15000 }); }); +test("excluding every scene says so instead of doing nothing silently", async ({ page }) => { + await app(page); + await page.evaluate(() => { + const { project } = window.FunPack; + while (project.scenes.length < 2) project.addScene(); + for (const s of project.scenes) project.setScene(s.id, "excluded", true); + }); + + const btn = page.getByRole("button", { name: "Generate All" }); + await btn.click(); + + await expect(page.locator(".cx-panel-status", { hasText: /every scene is excluded/i })) + .toBeVisible(); + // Nothing was ever started -- the button was never disabled by a batch + // that had nothing to run. + await expect(btn).toBeEnabled(); +}); + test("a second click while a batch is already running does not start an overlapping one", async ({ page }) => { await app(page); await page.evaluate(() => {