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

Commit25bc9b7

Browse files
authored
fix: Can't search homepage content (#1391)
* fix: Can't search homepage content* fix: when pathNamespaces does not exist* add test* update test to fix windows ci
1 parentae45b32 commit25bc9b7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

‎src/plugins/search/search.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ export function init(config, vm) {
226226
namespaceSuffix=matches[0];
227227
}
228228
}
229+
paths.unshift(namespaceSuffix+'/');
230+
}else{
231+
paths.unshift('/');
229232
}
230233

231234
constexpireKey=resolveExpireKey(config.namespace)+namespaceSuffix;

‎test/e2e/sidebar.test.js‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
constdocsifyInit=require('../helpers/docsify-init');
2+
3+
// Suite
4+
// -----------------------------------------------------------------------------
5+
describe('Sidebar Tests',function(){
6+
// Tests
7+
// ---------------------------------------------------------------------------
8+
test('search readme',async()=>{
9+
awaitdocsifyInit();
10+
awaitpage.goto(DOCS_URL+'/#/quickstart');
11+
awaitpage.fill('input[type=search]','Please consider donating');
12+
expect(
13+
awaitpage.innerText('.results-panel > .matching-post > a > h2')
14+
).toEqual('Donate');
15+
});
16+
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp