🌐 AI搜索 & 代理 主页
Skip to content
Merged
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
fix
  • Loading branch information
sy-records committed Oct 15, 2020
commit a5409eccfe7f0912a29fdd5c7379a2425951372d
21 changes: 16 additions & 5 deletions test/e2e/sidebar.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
const docsifyInit = require('../helpers/docsify-init');

// Suite
// -----------------------------------------------------------------------------
describe('Sidebar Tests', function() {
// Tests
// ---------------------------------------------------------------------------
test('search readme', async () => {
await page.goto(DOCS_URL + '/#/quickstart');
await page.fill('input[type=search]', 'Donate');
expect(
await page.innerText('.results-panel > .matching-post > a > h2')
).toEqual('Donate');
const docsifyInitConfig = {
markdown: {
homepage: `
# Hello World

This is the homepage.
`,
},
scriptURLs: ['/lib/plugins/search.min.js'],
styleURLs: ['/lib/themes/vue.css'],
};
await docsifyInit(docsifyInitConfig);
await page.fill('input[type=search]', 'Hello');
expect(await page.innerText('.results-panel h2')).toEqual('Hello World');
});
});