Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/render/render-code-tools.test.ts
12925 views
1
/*
2
* render-r.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
8
import { fileLoader } from "../../utils.ts";
9
import { ensureHtmlElements } from "../../verify.ts";
10
import { testRender } from "./render.ts";
11
12
let doc = fileLoader("code-tools")(
13
"code-tools-activated.qmd",
14
"html",
15
);
16
testRender(doc.input, "html", false, [
17
ensureHtmlElements(doc.output.outputPath, [
18
"div.quarto-title-block button#quarto-code-tools-source",
19
"div#quarto-embedded-source-code-modal",
20
]),
21
]);
22
23
doc = fileLoader("code-tools")("code-tools-toggle.qmd", "html");
24
testRender(doc.input, "html", false, [
25
ensureHtmlElements(doc.output.outputPath, [
26
"div.quarto-title-block button#quarto-code-tools-menu",
27
"div.cell > details",
28
]),
29
]);
30
31
doc = fileLoader("code-tools")("code-tools-external-source.qmd", "html");
32
testRender(doc.input, "html", false, [
33
ensureHtmlElements(doc.output.outputPath, [
34
"div.quarto-title-block button#quarto-code-tools-source[data-quarto-source-url]",
35
]),
36
]);
37