|
29 | 29 |
|
30 | 30 | SITES_THAT_SHOULD_SUCCEED = [ |
31 | 31 | "mkdocs.yml", |
| 32 | + "mkdocs_custom_href.yml", |
32 | 33 | "mkdocs_complete_material_disabled.yml", |
33 | 34 | "mkdocs_complete_material.yml", |
34 | 35 | "mkdocs_exclude.yml", |
@@ -92,6 +93,27 @@ def test_basic_working(tmp_path, mkdocs_file): |
92 | 93 | assert re. search( '<a href="mailto:[email protected]">Tim Vink</a>', contents) |
93 | 94 |
|
94 | 95 |
|
| 96 | +def test_custom_href(tmp_path): |
| 97 | + """ |
| 98 | + """ |
| 99 | + result = build_docs_setup("tests/basic_setup/mkdocs_custom_href.yml", tmp_path) |
| 100 | + assert result.exit_code == 0, ( |
| 101 | + "'mkdocs build' command failed. Error: %s" % result.stdout |
| 102 | + ) |
| 103 | + |
| 104 | + index_file = tmp_path / "index.html" |
| 105 | + assert index_file.exists(), "%s does not exist" % index_file |
| 106 | + |
| 107 | + contents = index_file.read_text() |
| 108 | + assert re.search("<span class='git-page-authors", contents) |
| 109 | + # Checking Page Authors |
| 110 | + assert re.search((r"<p>Page authors:.*<a href='https://teams.microsoft.com/l/chat/0/0\?" |
| 111 | + "[email protected]'>Tim Vink</a>.*<\/p>"), contents) |
| 112 | + # Checking Site Authors |
| 113 | + assert re.search(('<li><a href="https://teams.microsoft.com/l/chat/0/0\?' |
| 114 | + '[email protected]">Tim Vink</a><\/li>'), contents) |
| 115 | + |
| 116 | + |
95 | 117 |
|
96 | 118 | def test_no_email(tmp_path): |
97 | 119 |
|
|
0 commit comments