Skip to content

Commit

Permalink
Merge branch 'develop' into snyk-upgrade-f3b03fb5f2097643182713e291b3…
Browse files Browse the repository at this point in the history
…7245
  • Loading branch information
sy-records authored Oct 15, 2020
2 parents 24ce661 + ee550d0 commit 2b2a252
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
38 changes: 38 additions & 0 deletions test/e2e/search.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const docsifyInit = require('../helpers/docsify-init');

// Suite
// -----------------------------------------------------------------------------
describe('Search Plugin Tests', function() {
// Tests
// ---------------------------------------------------------------------------
test('search readme', async () => {
const docsifyInitConfig = {
markdown: {
homepage: `
# Hello World
This is the homepage.
`,
sidebar: `
- [Home page](/)
- [Test Page](test)
`,
},
routes: {
'/test.md': `
# Test Page
This is a custom route.
`,
},
scriptURLs: ['/lib/plugins/search.min.js'],
};

await docsifyInit(docsifyInitConfig);
await page.fill('input[type=search]', 'hello');
await expect(page).toEqualText('.results-panel h2', 'Hello World');
await page.click('.clear-button');
await page.fill('input[type=search]', 'test');
await expect(page).toEqualText('.results-panel h2', 'Test Page');
});
});
16 changes: 0 additions & 16 deletions test/e2e/sidebar.test.js

This file was deleted.

0 comments on commit 2b2a252

Please sign in to comment.