Skip to content

Commit a5409ec

Browse files
committed
fix
1 parent dbe002c commit a5409ec

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

test/e2e/sidebar.test.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1+
const docsifyInit = require('../helpers/docsify-init');
2+
13
// Suite
24
// -----------------------------------------------------------------------------
35
describe('Sidebar Tests', function() {
46
// Tests
57
// ---------------------------------------------------------------------------
68
test('search readme', async () => {
7-
await page.goto(DOCS_URL + '/#/quickstart');
8-
await page.fill('input[type=search]', 'Donate');
9-
expect(
10-
await page.innerText('.results-panel > .matching-post > a > h2')
11-
).toEqual('Donate');
9+
const docsifyInitConfig = {
10+
markdown: {
11+
homepage: `
12+
# Hello World
13+
14+
This is the homepage.
15+
`,
16+
},
17+
scriptURLs: ['/lib/plugins/search.min.js'],
18+
styleURLs: ['/lib/themes/vue.css'],
19+
};
20+
await docsifyInit(docsifyInitConfig);
21+
await page.fill('input[type=search]', 'Hello');
22+
expect(await page.innerText('.results-panel h2')).toEqual('Hello World');
1223
});
1324
});

0 commit comments

Comments
 (0)