Skip to content

Commit 2140278

Browse files
committed
revealjs - add tests to links to elements
including #3533 solved by #4623 without a test at the time
1 parent f8e3406 commit 2140278

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Links to nested elements works
3+
format: revealjs
4+
_quarto:
5+
tests:
6+
revealjs:
7+
ensureHtmlElements:
8+
-
9+
- 'img.r-stretch#fig-elephant'
10+
- 'a[href="#/fig-elephant"]'
11+
- 'img.r-stretch#elephant'
12+
- 'a[href="#/elephant"]'
13+
- 'span#eq-EEE > span.math'
14+
- 'a[href="#/eq-EEE"]'
15+
- 'div.theorem#thm-TTT'
16+
- 'a[href="#/thm-TTT"]'
17+
- []
18+
---
19+
20+
<!-- TODO: Add test with puppeteer about link working -->
21+
22+
## Quarto Figure
23+
24+
![Elephant](https://quarto.org/docs/authoring/images/crossref-figure.png){#fig-elephant}
25+
26+
## Link to the figure
27+
28+
See [Figure Element](#fig-elephant)
29+
30+
## Image
31+
32+
![Elephant](https://quarto.org/docs/authoring/images/crossref-figure.png){#elephant}
33+
34+
## Link to the image
35+
36+
See [Figure Element](#elephant)
37+
38+
## Equation
39+
40+
$$
41+
\begin{aligned}
42+
f(X) = y.
43+
\end{aligned}
44+
$$ {#eq-EEE}
45+
46+
## Link to equation
47+
48+
See @eq-EEE.
49+
50+
## Theorem
51+
52+
::: {#thm-TTT}
53+
Lorem ipsum dolor sit amet, qui minim labore adipisicing minim sint cillum sint consectetur cupidatat.
54+
:::
55+
56+
## Link to theorem
57+
58+
See @thm-TTT.

0 commit comments

Comments
 (0)