-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f184834
commit 721735b
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
site_name: test gitauthors_plugin | ||
use_directory_urls: true | ||
|
||
plugins: | ||
- search | ||
- git-authors: | ||
href: "https://teams.microsoft.com/l/chat/0/0?users={email}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
|
||
SITES_THAT_SHOULD_SUCCEED = [ | ||
"mkdocs.yml", | ||
"mkdocs_custom_href.yml", | ||
"mkdocs_complete_material_disabled.yml", | ||
"mkdocs_complete_material.yml", | ||
"mkdocs_exclude.yml", | ||
|
@@ -92,6 +93,27 @@ def test_basic_working(tmp_path, mkdocs_file): | |
assert re.search('<a href="mailto:[email protected]">Tim Vink</a>', contents) | ||
|
||
|
||
def test_custom_href(tmp_path): | ||
""" | ||
""" | ||
result = build_docs_setup("tests/basic_setup/mkdocs_custom_href.yml", tmp_path) | ||
assert result.exit_code == 0, ( | ||
"'mkdocs build' command failed. Error: %s" % result.stdout | ||
) | ||
|
||
index_file = tmp_path / "index.html" | ||
assert index_file.exists(), "%s does not exist" % index_file | ||
|
||
contents = index_file.read_text() | ||
assert re.search("<span class='git-page-authors", contents) | ||
# Checking Page Authors | ||
assert re.search((r"<p>Page authors:.*<a href='https://teams.microsoft.com/l/chat/0/0\?" | ||
"[email protected]'>Tim Vink</a>.*<\/p>"), contents) | ||
# Checking Site Authors | ||
assert re.search(('<li><a href="https://teams.microsoft.com/l/chat/0/0\?' | ||
'[email protected]">Tim Vink</a><\/li>'), contents) | ||
|
||
|
||
|
||
def test_no_email(tmp_path): | ||
|
||
|