pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/docsifyjs/docsify/pull/1535/commits/fe30b70030d629dffecfb3354faba09d47ec0fdf

github.githubassets.com/assets/github-cf976967feea1e66.css" /> [embedding] feat: allow user configured navbar site by Evidlo · Pull Request #1535 · docsifyjs/docsify · GitHub
Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add tests for nav_el option
  • Loading branch information
Evidlo committed Jun 23, 2021
commit fe30b70030d629dffecfb3354faba09d47ec0fdf
39 changes: 39 additions & 0 deletions test/e2e/nav.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const docsifyInit = require('../helpers/docsify-init');

describe(`Navbar tests`, function() {
test('specify custom navbar element in config with nav_el', async () => {
const docsifyInitConfig = {
html: `
<html>
<body>
<nav id="mynav"></nav>
<div id="app"></nav>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are closing <div id="app"> with </nav>. This should close with </div>.

</body>
</html>
`,
markdown: {
navbar: `
- [Foo](foo)
- [Bar](bar)
`,
homepage: `
# hello world
foo
`,
},
config: {
nav_el: '#mynav',
},
};

await docsifyInit(docsifyInitConfig);
await expect(page).toHaveText(
'#mynav',
'<li><a href="#/foo" title="Foo">Foo</a></li>'
);
await expect(page).toHaveText(
'#mynav',
'<li><a href="#/bar" title="Bar">Bar</a></li>'
);
});
});
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy