diff --git a/src/pages/ImportPage.render.test.tsx b/src/pages/ImportPage.render.test.tsx index 3270e49..c4731b0 100644 --- a/src/pages/ImportPage.render.test.tsx +++ b/src/pages/ImportPage.render.test.tsx @@ -303,6 +303,23 @@ describe("ImportPage — before the folder is read (#384)", () => { }); }); +describe("ImportPage — the empty state's one prop (#384)", () => { + it("an import folder stored as \"\": the 'no source' variant, as the card says", () => { + // `folderName` alone tells the variants apart: the page hands "" for "", + // as `hasFolder` (`importFolder !== null`) did, so the empty state and + // the card (`hasFolder` of `importCardModel`) keep speaking of a folder. + harness.wizard = wizard({ importFolder: "" }); + harness.onboarding = path(ZERO, true); + const html = render(); + expect(html).toContain("t(import.empty.noSources.title)"); + expect(html).not.toContain("import.empty.noFolder.title"); + expect(sentence(html)).toBe( + "t(onboarding.card.import.noSources[folder=,refresh=t(import.empty.refresh),sample=t(import.empty.createSample)])", + ); + expect(highlighted(html).inner).toBe("t(import.empty.createSample)"); + }); +}); + describe("ImportPage — files placed directly in the import folder (#427)", () => { const WARNING = "t(import.rootFiles.message[";