-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case to check variable outputs include (#1324)
There are currently no test cases to test the feature where "variable" can store "include" tags and output the content properly. Let's add this test case to test_site.
- Loading branch information
Showing
5 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/cli/test/functional/test_site/contentFragmentToInclude.md
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 @@ | ||
<div id="fragment">content fragment</div> |
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
71 changes: 71 additions & 0 deletions
71
packages/cli/test/functional/test_site/expected/testVariableContainsInclude.html
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,71 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta name="default-head-top"> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="generator" content="MarkBind 2.15.2"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Variable should be able to store included content fragments</title> | ||
<link rel="stylesheet" href="markbind/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="markbind/css/bootstrap-vue.min.css"> | ||
<link rel="stylesheet" href="markbind/fontawesome/css/all.min.css"> | ||
<link rel="stylesheet" href="markbind/glyphicons/css/bootstrap-glyphicons.min.css"> | ||
<link rel="stylesheet" href="markbind/css/octicons.css"> | ||
<link rel="stylesheet" href="markbind/css/github.min.css"> | ||
<link rel="stylesheet" href="markbind/css/markbind.css"> | ||
<script src="markbind/js/polyfill.min.js"></script> | ||
<script src="markbind/js/vue.min.js"></script> | ||
<script src="markbind/js/components.min.js"></script> | ||
<script src="markbind/js/jquery.min.js"></script> | ||
<link rel="stylesheet" href="/test_site/plugins/testMarkbindPlugin/testMarkbindPluginStylesheet.css"> | ||
<link rel="stylesheet" href="/test_site/plugins/markbind-plugin-anchors/markbind-plugin-anchors.css"> | ||
<link rel="stylesheet" href="markbind/layouts/default/styles.css"> | ||
<meta name="default-head-bottom"> | ||
<link rel="icon" href="/test_site/favicon.png"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"> | ||
<div id="flex-body"> | ||
<div id="content-wrapper"> | ||
<div></div> | ||
<h1 id="content-fragment"><span>content fragment</span><a class="fa fa-anchor" href="#content-fragment" onclick="event.stopPropagation()"></a></h1> | ||
</div> | ||
|
||
|
||
</div> | ||
<footer> | ||
<div class="text-center"> | ||
Default footer | ||
</div> | ||
</footer> | ||
</div> | ||
</body> | ||
<script src="markbind/js/bootstrap-utility.min.js"></script> | ||
<script> | ||
const baseUrl = '/test_site' | ||
const enableSearch = true | ||
</script> | ||
<script src="markbind/js/setup.js"></script> | ||
<script src="/test_site/plugins/testMarkbindPlugin/testMarkbindPluginScript.js"></script> | ||
<script> | ||
alert("Inline plugin script loaded!") | ||
</script> | ||
|
||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=TRACKING-ID"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
|
||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'TRACKING-ID'); | ||
</script> | ||
<script src="markbind/layouts/default/scripts.js"></script> | ||
|
||
</html> |
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
3 changes: 3 additions & 0 deletions
3
packages/cli/test/functional/test_site/testVariableContainsInclude.md
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,3 @@ | ||
<variable name="test"># <include src="contentFragmentToInclude.md#fragment" inline /></variable> | ||
|
||
{{ test }} |