Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/site/render-blog.test.ts
6434 views
1
/*
2
* render-blog.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
import { docs } from "../../utils.ts";
8
import { testSite } from "./site.ts";
9
10
testSite(docs("blog/about.qmd"), docs("blog/about.qmd"), [
11
"div.quarto-about-jolla", // Correct type
12
"img.about-image", // Image is present
13
"div.about-links", // Links are present
14
"main.content", // Main content is still there
15
], []);
16
testSite(docs("blog/index.qmd"), docs("blog"), [
17
"div#listing-listing", // the listing is rendered there
18
"div.list.quarto-listing-default", // The correct type of listing
19
".quarto-listing-category-title", // Categories are present
20
], []);
21
22
testSite(docs("blog-grid/index.qmd"), docs("blog-grid"), [
23
"div.list.grid.quarto-listing-cols-3 > div:nth-child(1) div.listing-item-img-placeholder.card-img-top", // Placeholder structure correct
24
"div.list.grid.quarto-listing-cols-3 > div:nth-child(2) p.card-img-top > img", // The grid image structure is correct
25
"div.list.grid.quarto-listing-cols-3 > div:nth-child(3) p.card-img-top > img", // The grid image structure is correct
26
], []);
27
28