Skip to content

Commit a17c0dc

Browse files
committed
add test
1 parent d1d9fd3 commit a17c0dc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/e2e/search.test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,27 @@ describe('Search Plugin Tests', function() {
3535
await page.fill('input[type=search]', 'test');
3636
await expect(page).toEqualText('.results-panel h2', 'Test Page');
3737
});
38+
39+
test('search ignore title', async () => {
40+
const docsifyInitConfig = {
41+
markdown: {
42+
homepage: `
43+
# Hello World
44+
45+
This is the homepage.
46+
47+
## Test ignore title <!-- {docsify-ignore} -->
48+
49+
This is the test ignore title.
50+
`,
51+
},
52+
scriptURLs: ['/lib/plugins/search.min.js'],
53+
styleURLs: ['/lib/themes/vue.css'],
54+
};
55+
await docsifyInit(docsifyInitConfig);
56+
await page.fill('input[type=search]', 'Test ignore title');
57+
expect(await page.innerText('.results-panel h2')).toEqual(
58+
'Test ignore title'
59+
);
60+
});
3861
});

0 commit comments

Comments
 (0)