diff --git a/tests/e2e/__snapshots__/include-toc.test.ts.snap b/tests/e2e/__snapshots__/include-toc.test.ts.snap index 986277f4..ec4d957b 100644 --- a/tests/e2e/__snapshots__/include-toc.test.ts.snap +++ b/tests/e2e/__snapshots__/include-toc.test.ts.snap @@ -1,6 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Include toc Nested toc inclusions with mixed including modes 1`] = `"["product1/_includes/inc.md","product1/article1.md","product1/toc.yaml","product2/overlay1/_includes/inc.md","product2/overlay1/article1.md","product2/overlay2/_includes/inc.md","product2/overlay2/article1.md","product2/overlay3/_includes/inc.md","product2/overlay3/article1.md","product2/p2.md","product2/toc.yaml"]"`; +exports[`Include toc Nested toc inclusions with mixed including modes 1`] = ` +"[ + "product1/_includes/inc.md", + "product1/article1.md", + "product1/toc.yaml", + "product2/overlay1/_includes/inc.md", + "product2/overlay1/article1.md", + "product2/overlay2/_includes/inc.md", + "product2/overlay2/article1.md", + "product2/overlay3/_includes/inc.md", + "product2/overlay3/article1.md", + "product2/p2.md", + "product2/toc.yaml" +]" +`; exports[`Include toc Nested toc inclusions with mixed including modes 2`] = ` "--- @@ -112,7 +126,14 @@ deepBase: 1 " `; -exports[`Include toc Toc is included in link mode 1`] = `"["a1.md","folder1/a1.md","folder1/folder2/a1.md","toc.yaml"]"`; +exports[`Include toc Toc is included in link mode 1`] = ` +"[ + "a1.md", + "folder1/a1.md", + "folder1/folder2/a1.md", + "toc.yaml" +]" +`; exports[`Include toc Toc is included in link mode 2`] = ` "This is the /a1.md file content. @@ -146,7 +167,21 @@ deepBase: 0 " `; -exports[`Include toc Toc is included inline, not as a new section 1`] = `"[".yfm","file1.md","fileA.md","fileB.md","fileC.md","fileX.md","folder/fileA.md","folder/fileB.md","folder/fileC.md","folder/folder/fileC.md","toc.yaml"]"`; +exports[`Include toc Toc is included inline, not as a new section 1`] = ` +"[ + ".yfm", + "file1.md", + "fileA.md", + "fileB.md", + "fileC.md", + "fileX.md", + "folder/fileA.md", + "folder/fileB.md", + "folder/fileC.md", + "folder/folder/fileC.md", + "toc.yaml" +]" +`; exports[`Include toc Toc is included inline, not as a new section 2`] = ` "applyPresets: true @@ -261,7 +296,13 @@ deepBase: 0 " `; -exports[`Include toc Toc with expressions 1`] = `"["a1.md","index.yaml","toc.yaml"]"`; +exports[`Include toc Toc with expressions 1`] = ` +"[ + "a1.md", + "index.yaml", + "toc.yaml" +]" +`; exports[`Include toc Toc with expressions 2`] = ` "This is the /a1.md file content. diff --git a/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap b/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap index 0c2b41eb..cf882252 100644 --- a/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap +++ b/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap @@ -1,6 +1,25 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Allow load custom resources md2html single page with custom resources 1`] = `"["_assets/script/test1.js","_assets/style/test.css","_bundle/112.js","_bundle/829.js","_bundle/934.js","_bundle/998.js","_bundle/app.css","_bundle/app.js","_bundle/app.rtl.css","_bundle/extensions_search_lib_worker_index_js.js","_bundle/react.js","_bundle/search.js","_bundle/vendor.css","_bundle/vendor.js","_bundle/vendor.rtl.css","_bundle/vendors-node_modules_lunr_lunr_js.js","index.html","page.html","project/config.html","single-page.html","single-page.json"]"`; +exports[`Allow load custom resources md2html single page with custom resources 1`] = ` +"[ + "_assets/script/test1.js", + "_assets/style/test.css", + "_bundle/search-async-0", + "_bundle/app-css-1", + "_bundle/app-js-1", + "_bundle/search-css-2", + "_bundle/search-js-0", + "_bundle/search-js-1", + "_bundle/search-css-0", + "_bundle/search-js-2", + "_bundle/search-css-1", + "index.html", + "page.html", + "project/config.html", + "single-page.html", + "single-page.json" +]" +`; exports[`Allow load custom resources md2html single page with custom resources 2`] = ` @@ -29,11 +48,11 @@ exports[`Allow load custom resources md2html single page with custom resources 2 @@ -90,11 +109,11 @@ exports[`Allow load custom resources md2html single page with custom resources 3 Lorem -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"]}; @@ -150,11 +169,11 @@ exports[`Allow load custom resources md2html single page with custom resources 4 Lorem -

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"]}; @@ -210,11 +229,11 @@ exports[`Allow load custom resources md2html single page with custom resources 5 /n","headings":[],"meta":{"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"toc":{"title":"Documentation","href":"index.yaml","items":[{"name":"Documentation","href":"#_page","id":"Documentation-RANDOM"},{"name":"Config","href":"#_project_config","id":"Config-RANDOM"}],"base":".","deepBase":0,"singlePage":true}},"router":{"pathname":"single-page.html"},"lang":"ru","langs":["ru"]}; @@ -254,7 +273,24 @@ exports[`Allow load custom resources md2html single page with custom resources 5 exports[`Allow load custom resources md2html single page with custom resources 6`] = `"{"data":{"leading":false,"html":"

Lorem

/n

Lorem

/n","headings":[],"meta":{"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"toc":{"title":"Documentation","href":"index.yaml","items":[{"name":"Documentation","href":"#_page","id":"Documentation-RANDOM"},{"name":"Config","href":"#_project_config","id":"Config-RANDOM"}],"base":".","deepBase":0,"singlePage":true}},"router":{"pathname":"single-page.html"},"lang":"ru","langs":["ru"]}"`; -exports[`Allow load custom resources md2html with custom resources 1`] = `"["_assets/script/test1.js","_assets/style/test.css","_bundle/112.js","_bundle/829.js","_bundle/934.js","_bundle/998.js","_bundle/app.css","_bundle/app.js","_bundle/app.rtl.css","_bundle/extensions_search_lib_worker_index_js.js","_bundle/react.js","_bundle/search.js","_bundle/vendor.css","_bundle/vendor.js","_bundle/vendor.rtl.css","_bundle/vendors-node_modules_lunr_lunr_js.js","index.html","page.html","project/config.html"]"`; +exports[`Allow load custom resources md2html with custom resources 1`] = ` +"[ + "_assets/script/test1.js", + "_assets/style/test.css", + "_bundle/search-async-0", + "_bundle/app-css-1", + "_bundle/app-js-1", + "_bundle/search-css-2", + "_bundle/search-js-0", + "_bundle/search-js-1", + "_bundle/search-css-0", + "_bundle/search-js-2", + "_bundle/search-css-1", + "index.html", + "page.html", + "project/config.html" +]" +`; exports[`Allow load custom resources md2html with custom resources 2`] = ` @@ -283,11 +319,11 @@ exports[`Allow load custom resources md2html with custom resources 2`] = ` @@ -344,11 +380,11 @@ exports[`Allow load custom resources md2html with custom resources 3`] = ` Lorem -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"]}; @@ -404,11 +440,11 @@ exports[`Allow load custom resources md2html with custom resources 4`] = ` Lorem -

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"]}; `; -exports[`Allow load custom resources md2md with custom resources 1`] = `"[".yfm","_assets/script/test1.js","_assets/style/test.css","index.yaml","page.md","project/config.md","toc.yaml"]"`; +exports[`Allow load custom resources md2md with custom resources 1`] = ` +"[ + ".yfm", + "_assets/script/test1.js", + "_assets/style/test.css", + "index.yaml", + "page.md", + "project/config.md", + "toc.yaml" +]" +`; exports[`Allow load custom resources md2md with custom resources 2`] = ` "resources: diff --git a/tests/e2e/__snapshots__/metadata.spec.ts.snap b/tests/e2e/__snapshots__/metadata.spec.ts.snap index 2e4d8151..5166c5e6 100644 --- a/tests/e2e/__snapshots__/metadata.spec.ts.snap +++ b/tests/e2e/__snapshots__/metadata.spec.ts.snap @@ -1,6 +1,21 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Allow load custom resources md2html with metadata 1`] = `"["_bundle/112.js","_bundle/829.js","_bundle/934.js","_bundle/998.js","_bundle/app.css","_bundle/app.js","_bundle/app.rtl.css","_bundle/extensions_search_lib_worker_index_js.js","_bundle/react.js","_bundle/search.js","_bundle/vendor.css","_bundle/vendor.js","_bundle/vendor.rtl.css","_bundle/vendors-node_modules_lunr_lunr_js.js","index.html","page.html","project/config.html"]"`; +exports[`Allow load custom resources md2html with metadata 1`] = ` +"[ + "_bundle/search-async-0", + "_bundle/app-css-1", + "_bundle/app-js-1", + "_bundle/search-css-2", + "_bundle/search-js-0", + "_bundle/search-js-1", + "_bundle/search-css-0", + "_bundle/search-js-2", + "_bundle/search-css-1", + "index.html", + "page.html", + "project/config.html" +]" +`; exports[`Allow load custom resources md2html with metadata 2`] = ` @@ -35,11 +50,11 @@ exports[`Allow load custom resources md2html with metadata 2`] = ` @@ -47,18 +62,18 @@ exports[`Allow load custom resources md2html with metadata 2`] = ` @@ -95,11 +110,11 @@ exports[`Allow load custom resources md2html with metadata 3`] = ` @@ -109,18 +124,18 @@ exports[`Allow load custom resources md2html with metadata 3`] = ` window.STATIC_CONTENT = false window.__DATA__ = {"data":{"leading":false,"toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"Documentation-RANDOM"},{"name":"Config","href":"project/config.html","id":"Config-RANDOM"}],"base":".","deepBase":0},"meta":{"metadata":[{"name":"yfm","value":"builder in page"},{"name":"test-yfm","content":"inline test"},{"name":"yfm-config","content":"config test"}],"style":[],"script":[]},"assets":[],"headings":[],"title":"","includes":[],"html":"

Lorem -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ru","langs":["ru"]}; @@ -157,11 +172,11 @@ exports[`Allow load custom resources md2html with metadata 4`] = ` @@ -171,25 +186,32 @@ exports[`Allow load custom resources md2html with metadata 4`] = ` window.STATIC_CONTENT = false window.__DATA__ = {"data":{"leading":false,"toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"Documentation-RANDOM"},{"name":"Config","href":"project/config.html","id":"Config-RANDOM"}],"base":".","deepBase":0},"meta":{"metadata":[{"name":"yfm","value":"builder in config"},{"name":"test-yfm","content":"inline test"},{"name":"yfm-config","content":"config test"}],"style":[],"script":[]},"assets":[],"headings":[],"title":"","includes":[],"html":"

Lorem -

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"],"search":{}}; +

/n"},"router":{"pathname":"project/config.html","depth":2},"lang":"ru","langs":["ru"]}; `; -exports[`Allow load custom resources md2md with metadata 1`] = `"["index.yaml","page.md","project/config.md","toc.yaml"]"`; +exports[`Allow load custom resources md2md with metadata 1`] = ` +"[ + "index.yaml", + "page.md", + "project/config.md", + "toc.yaml" +]" +`; exports[`Allow load custom resources md2md with metadata 2`] = ` "title: Documentation diff --git a/tests/e2e/__snapshots__/rtl.spec.ts.snap b/tests/e2e/__snapshots__/rtl.spec.ts.snap index e166eacb..e08d5b3a 100644 --- a/tests/e2e/__snapshots__/rtl.spec.ts.snap +++ b/tests/e2e/__snapshots__/rtl.spec.ts.snap @@ -1,6 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with only one rtl lang 1`] = `"["_bundle/112.js","_bundle/829.js","_bundle/934.js","_bundle/998.js","_bundle/app.css","_bundle/app.js","_bundle/app.rtl.css","_bundle/extensions_search_lib_worker_index_js.js","_bundle/react.js","_bundle/search.js","_bundle/vendor.css","_bundle/vendor.js","_bundle/vendor.rtl.css","_bundle/vendors-node_modules_lunr_lunr_js.js","index.html","page.html"]"`; +exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with only one rtl lang 1`] = ` +"[ + "_bundle/search-async-0", + "_bundle/app-css-1", + "_bundle/app-js-1", + "_bundle/search-css-2", + "_bundle/search-js-0", + "_bundle/search-js-1", + "_bundle/search-css-0", + "_bundle/search-js-2", + "_bundle/search-css-1", + "index.html", + "page.html" +]" +`; exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with only one rtl lang 2`] = ` @@ -23,11 +37,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -35,18 +49,18 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -74,11 +88,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -88,25 +102,42 @@ exports[`Generate html document with correct lang and dir attributes. Load corre window.STATIC_CONTENT = false window.__DATA__ = {"data":{"leading":false,"toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"Documentation-RANDOM"}],"base":".","deepBase":0},"meta":{"metadata":[],"style":[],"script":[]},"assets":[],"headings":[],"title":"","includes":[],"html":"

תיעוד -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"he","langs":["he"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":1},"lang":"he","langs":["he"]}; `; -exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with rtl and ltr langs 1`] = `"["_bundle/112.js","_bundle/829.js","_bundle/934.js","_bundle/998.js","_bundle/app.css","_bundle/app.js","_bundle/app.rtl.css","_bundle/extensions_search_lib_worker_index_js.js","_bundle/react.js","_bundle/search.js","_bundle/vendor.css","_bundle/vendor.js","_bundle/vendor.rtl.css","_bundle/vendors-node_modules_lunr_lunr_js.js","ar/index.html","ar/page.html","en/index.html","en/page.html","index.html"]"`; +exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with rtl and ltr langs 1`] = ` +"[ + "_bundle/search-async-0", + "_bundle/app-css-1", + "_bundle/app-js-1", + "_bundle/search-css-2", + "_bundle/search-js-0", + "_bundle/search-js-1", + "_bundle/search-css-0", + "_bundle/search-js-2", + "_bundle/search-css-1", + "ar/index.html", + "ar/page.html", + "en/index.html", + "en/page.html", + "index.html" +]" +`; exports[`Generate html document with correct lang and dir attributes. Load correct bundles. documentation with rtl and ltr langs 2`] = ` @@ -129,11 +160,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -141,18 +172,18 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -180,11 +211,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -194,18 +225,18 @@ exports[`Generate html document with correct lang and dir attributes. Load corre window.STATIC_CONTENT = false window.__DATA__ = {"data":{"leading":false,"toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"Documentation-RANDOM"}],"base":"ar","deepBase":1},"meta":{"metadata":[],"style":[],"script":[]},"assets":[],"headings":[],"title":"","includes":[],"html":"

توثيق -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"ar","langs":["ar","en"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":2},"lang":"ar","langs":["ar","en"]}; @@ -239,11 +270,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -251,18 +282,18 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -293,11 +324,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre @@ -307,18 +338,18 @@ exports[`Generate html document with correct lang and dir attributes. Load corre window.STATIC_CONTENT = false window.__DATA__ = {"data":{"leading":false,"toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"Documentation-RANDOM"}],"base":"en","deepBase":1},"meta":{"metadata":[{"name":"yfm","content":"builder"}],"style":[],"script":[]},"assets":[],"headings":[],"title":"","includes":[],"html":"

Lorem -

/n"},"router":{"pathname":"page.html","depth":1},"lang":"en","langs":["ar","en"],"search":{}}; +

/n"},"router":{"pathname":"page.html","depth":2},"lang":"en","langs":["ar","en"]}; @@ -348,11 +379,11 @@ exports[`Generate html document with correct lang and dir attributes. Load corre