File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change
1
+ const docsifyInit = require ( '../helpers/docsify-init' ) ;
2
+
1
3
// Suite
2
4
// -----------------------------------------------------------------------------
3
5
describe ( 'Sidebar Tests' , function ( ) {
4
6
// Tests
5
7
// ---------------------------------------------------------------------------
6
8
test ( 'search readme' , async ( ) => {
7
- await page . goto ( DOCS_URL + '/#/quickstart' ) ;
8
- await page . fill ( 'input[type=search]' , 'Donate' ) ;
9
- expect (
10
- await page . innerText ( '.results-panel > .matching-post > a > h2' )
11
- ) . toEqual ( 'Donate' ) ;
9
+ const docsifyInitConfig = {
10
+ markdown : {
11
+ homepage : `
12
+ # Hello World
13
+
14
+ This is the homepage.
15
+ ` ,
16
+ } ,
17
+ scriptURLs : [ '/lib/plugins/search.min.js' ] ,
18
+ styleURLs : [ '/lib/themes/vue.css' ] ,
19
+ } ;
20
+ await docsifyInit ( docsifyInitConfig ) ;
21
+ await page . fill ( 'input[type=search]' , 'Hello' ) ;
22
+ expect ( await page . innerText ( '.results-panel h2' ) ) . toEqual ( 'Hello World' ) ;
12
23
} ) ;
13
24
} ) ;
You can’t perform that action at this time.
0 commit comments