Path: blob/main/tests/smoke/render/render-title-block.test.ts
12925 views
/*1* render-title-block.test.ts2*3* Copyright (C) 2020-2022 Posit Software, PBC4*5*/67import { docs, outputForInput } from "../../utils.ts";8import { ensureFileRegexMatches, ensureHtmlElements } from "../../verify.ts";9import { testRender } from "./render.ts";1011const input = docs("doc-layout/title-block.qmd");12const htmlOutput = outputForInput(input, "html");13testRender(input, "html", false, [14ensureHtmlElements(htmlOutput.outputPath, [15"div.quarto-title",16"p.subtitle",17"div.quarto-categories",18"div.quarto-title-meta",19], []),20]);2122const noneInput = docs("doc-layout/title-block-none.qmd");23const noneOutput = outputForInput(noneInput, "html");24testRender(noneInput, "html", false, [25ensureHtmlElements(noneOutput.outputPath, [26"p.author",27"p.date",28"#title-block-header",29], ["div.quarto-title"]),30ensureFileRegexMatches(noneOutput.outputPath, [/Nora Jones/], [/Published/]),31]);3233const bannerInput = docs("doc-layout/title-block-banner.qmd");34const bannerOutput = outputForInput(bannerInput, "html");35testRender(bannerInput, "html", false, [36ensureHtmlElements(bannerOutput.outputPath, [37"main.quarto-banner-title-block",38".quarto-title-banner .quarto-title.column-body",39"header#title-block-header",40".title",41".quarto-categories",42]),43ensureFileRegexMatches(bannerOutput.outputPath, [/Nora Jones/], [/\[true\]/]),44]);454647