|
29 | 29 | # does NOT include postprocessing artifacts such as nonlocal link titles and intersphinx lookups. |
30 | 30 |
|
31 | 31 |
|
| 32 | +def test_quiz() -> None: |
| 33 | + tabs_path = ROOT_PATH.joinpath(Path("test_quiz.rst")) |
| 34 | + project_config = ProjectConfig(ROOT_PATH, "", source="./") |
| 35 | + parser = rstparser.Parser(project_config, JSONVisitor) |
| 36 | + page, diagnostics = parse_rst(parser, tabs_path, None) |
| 37 | + page.finish(diagnostics) |
| 38 | + check_ast_testing_string( |
| 39 | + page.ast, |
| 40 | + """<root fileid="test_quiz.rst"> |
| 41 | + <directive name="quiz" domain="mongodb" quiz-id="mongoacc1"> |
| 42 | + <paragraph><text>With my MongoDB account, I can now access?</text></paragraph> |
| 43 | + <directive name="quizchoice" domain="mongodb"> |
| 44 | + <text>MongoDB Atlas</text> |
| 45 | + <paragraph><text>Up to 2 lines of copy here explaining why MongoDB Atlas isn’t the right answer choice</text></paragraph> |
| 46 | + </directive> |
| 47 | + <directive name="quizchoice" domain="mongodb"> |
| 48 | + <text>MongoDB University</text> |
| 49 | + <paragraph><text>Up to 2 lines of copy here explaining why MongoDB University isn’t the right answer choice</text></paragraph> |
| 50 | + </directive> |
| 51 | + <directive name="quizchoice" domain="mongodb" is-true="True"> |
| 52 | + <text>All of the Above</text> |
| 53 | + <paragraph><text>Your MongoDB account gives you access to all of the above: Atlas, University, Cloud Manager, etc.</text></paragraph> |
| 54 | + </directive> |
| 55 | + </directive> |
| 56 | + </root>""", |
| 57 | + ) |
| 58 | + |
| 59 | + |
32 | 60 | def test_tabs() -> None: |
33 | 61 | tabs_path = ROOT_PATH.joinpath(Path("test_tabs.rst")) |
34 | 62 | project_config = ProjectConfig(ROOT_PATH, "", source="./") |
|
0 commit comments