Skip to content

Commit a706e57

Browse files
committed
add test
1 parent 3c097f5 commit a706e57

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/e2e/sidebar.test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,27 @@ describe('Sidebar Tests', function() {
1313
await page.innerText('.results-panel > .matching-post > a > h2')
1414
).toEqual('Donate');
1515
});
16+
17+
test('search ignore title', async () => {
18+
const docsifyInitConfig = {
19+
markdown: {
20+
homepage: `
21+
# Hello World
22+
23+
This is the homepage.
24+
25+
## Test ignore title <!-- {docsify-ignore} -->
26+
27+
This is the test ignore title.
28+
`,
29+
},
30+
scriptURLs: ['/lib/plugins/search.min.js'],
31+
styleURLs: ['/lib/themes/vue.css'],
32+
};
33+
await docsifyInit(docsifyInitConfig);
34+
await page.fill('input[type=search]', 'Test ignore title');
35+
expect(await page.innerText('.results-panel h2')).toEqual(
36+
'Test ignore title'
37+
);
38+
});
1639
});

0 commit comments

Comments
 (0)