Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee550d0

Browse files
fix: search on homepage test (#1398)
* fix: ci build* reset* test* update* fix test* fix* Add multi-page search test* renameCo-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
1 parentc9d4f7a commitee550d0

File tree

2 files changed

+38
-16
lines changed

2 files changed

+38
-16
lines changed

‎test/e2e/search.test.js‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
constdocsifyInit=require('../helpers/docsify-init');
2+
3+
// Suite
4+
// -----------------------------------------------------------------------------
5+
describe('Search Plugin Tests',function(){
6+
// Tests
7+
// ---------------------------------------------------------------------------
8+
test('search readme',async()=>{
9+
constdocsifyInitConfig={
10+
markdown:{
11+
homepage:`
12+
# Hello World
13+
14+
This is the homepage.
15+
`,
16+
sidebar:`
17+
- [Home page](/)
18+
- [Test Page](test)
19+
`,
20+
},
21+
routes:{
22+
'/test.md':`
23+
# Test Page
24+
25+
This is a custom route.
26+
`,
27+
},
28+
scriptURLs:['/lib/plugins/search.min.js'],
29+
};
30+
31+
awaitdocsifyInit(docsifyInitConfig);
32+
awaitpage.fill('input[type=search]','hello');
33+
awaitexpect(page).toEqualText('.results-panel h2','Hello World');
34+
awaitpage.click('.clear-button');
35+
awaitpage.fill('input[type=search]','test');
36+
awaitexpect(page).toEqualText('.results-panel h2','Test Page');
37+
});
38+
});

‎test/e2e/sidebar.test.js‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp