11from pathlib import Path , PurePath
22from typing import Dict , Tuple , List
33from .steps import GizaStepsCategory
4- from .nodes import ast_to_testing_string
54from ..types import Diagnostic , Page , EmbeddedRstParser , ProjectConfig
65from ..parser import make_embedded_rst_parser
6+ from ..util import ast_to_testing_string
77
88
99def test_step () -> None :
@@ -31,6 +31,7 @@ def add_child_file() -> List[Diagnostic]:
3131 all_diagnostics [path ] = add_main_file ()
3232 all_diagnostics [child_path ] = add_child_file ()
3333
34+ assert len (category ) == 2
3435 file_id , giza_node = next (category .reify_all_files (all_diagnostics ))
3536
3637 def create_page () -> Tuple [Page , EmbeddedRstParser ]:
@@ -49,17 +50,24 @@ def create_page() -> Tuple[Page, EmbeddedRstParser]:
4950
5051 '<directive name="step"><section><heading><text>Create a </text><literal><text>' ,
5152 '/etc/apt/sources.list.d/mongodb-org-3.4.list</text></literal><text> file for MongoDB.' ,
52- '</text></heading><paragraph><text>Create the list file using the command appropriate for ' ,
53- 'your version\n of Debian.</text></paragraph></section></directive>' ,
53+ '</text></heading>' ,
54+ '<section><heading><text>Optional: action heading</text></heading>'
55+ '<paragraph><text>Create the list file using the command appropriate for ' ,
56+ 'your version\n of Debian.</text></paragraph>' ,
57+ '<paragraph><text>action-content</text></paragraph>' ,
58+ '<paragraph><text>action-post</text></paragraph>' ,
59+ '</section></section></directive>' ,
5460
5561 '<directive name="step"><section><heading><text>Reload local package database.</text>' ,
5662 '</heading><paragraph><text>Issue the following command to reload the local package ' ,
5763 'database:</text></paragraph><code lang="sh" copyable="True">sudo apt-get update\n </code>' ,
5864 '</section></directive>' ,
5965
6066 '<directive name="step"><section><heading><text>Install the MongoDB packages.</text>' ,
61- '</heading><paragraph><text>You can install either the latest stable version of MongoDB ' ,
67+ '</heading><paragraph><text>hi</text></paragraph>' ,
68+ '<paragraph><text>You can install either the latest stable version of MongoDB ' ,
6269 'or a\n specific version of MongoDB.</text></paragraph>' ,
6370 '<directive name="code-block">' ,
64- '<text>sh</text><literal></literal></directive></section></directive></directive>'
71+ '<text>sh</text><literal></literal></directive><paragraph><text>bye</text></paragraph>' ,
72+ '</section></directive></directive>'
6573 ))
0 commit comments