Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Oct 15, 2020
1 parent dbe002c commit a5409ec
Showing 1 changed file with 16 additions and 5 deletions.
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');
});
});

0 comments on commit a5409ec

Please sign in to comment.