Skip to content

Commit a59b417

Browse files
committed
fix test
1 parent a17c0dc commit a59b417

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

test/e2e/search.test.js

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,37 @@ describe('Search Plugin Tests', function() {
4040
const docsifyInitConfig = {
4141
markdown: {
4242
homepage: `
43-
# Hello World
43+
# Hello World
44+
45+
This is the homepage.
46+
`,
47+
sidebar: `
48+
- [Home page](/)
49+
- [GitHub Pages](github)
50+
`,
51+
},
52+
routes: {
53+
'/github.md': `
54+
# GitHub Pages
4455
45-
This is the homepage.
56+
This is the GitHub Pages.
4657
47-
## Test ignore title <!-- {docsify-ignore} -->
58+
## GitHub Pages ignore1 <!-- {docsify-ignore} -->
4859
49-
This is the test ignore title.
50-
`,
60+
There're three places to populate your docs for your Github repository1.
61+
62+
## GitHub Pages ignore2 {docsify-ignore}
63+
64+
There're three places to populate your docs for your Github repository2.
65+
`,
5166
},
5267
scriptURLs: ['/lib/plugins/search.min.js'],
53-
styleURLs: ['/lib/themes/vue.css'],
5468
};
5569
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-
);
70+
await page.fill('input[type=search]', 'repository1');
71+
await expect(page).toEqualText('.results-panel h2', 'GitHub Pages ignore1');
72+
await page.click('.clear-button');
73+
await page.fill('input[type=search]', 'repository2');
74+
await expect(page).toEqualText('.results-panel h2', 'GitHub Pages ignore2');
6075
});
6176
});

0 commit comments

Comments
 (0)