File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 8
8
xmlns : e =" http://github.com/oreillymedia/epubrenderer"
9
9
stylesheet =" ../htmlbook.xsl" >
10
10
11
- <x : pending >
12
11
<x : scenario label =" When *empty* TOC nav element is matched" >
13
- <x : context >
12
+ <x : context select = " //h:nav[1] " >
14
13
<body >
15
14
<nav data-type =" toc" />
16
- <section data-type =" chapter" >
15
+ <section id = " chapter " data-type =" chapter" >
17
16
<h1 >This chapter head should be in TOC</h1 >
18
17
<p >Go TOC!</p >
19
18
</section >
20
19
</body >
21
- <x : param name =" " />
22
20
</x : context >
23
21
24
22
<x : scenario label =" And autogenerate-toc param is *enabled*" >
25
- <x : context />
26
- <x : expect label =" TOC content should be generated" />
23
+ <x : context >
24
+ <x : param name =" autogenerate-toc" select =" 1" />
25
+ </x : context >
26
+ <x : expect label =" TOC content should be generated"
27
+ test=" count(h:nav[.//h:li[contains(., 'This chapter head should be in TOC')]]) = 1" />
27
28
</x : scenario >
28
29
29
30
<x : scenario label =" And autogenerate-toc param is *disabled*" >
30
- <x : context />
31
- <x : expect label =" TOC content *should not* be generated (nav should stay empty" />
31
+ <x : context >
32
+ <x : param name =" autogenerate-toc" select =" 0" />
33
+ </x : context >
34
+ <x : expect label =" TOC content *should not* be generated (nav should stay empty)" >
35
+ <nav data-type =" toc" id =" ..." />
36
+ </x : expect >
32
37
</x : scenario >
33
38
</x : scenario >
39
+
40
+ <x : pending >
34
41
35
42
<x : scenario label =" When *nonempty* TOC nav element is matched" >
36
43
<x : context >
You can’t perform that action at this time.
0 commit comments