File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 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+
13// Suite
24// -----------------------------------------------------------------------------
35describe ( 'Sidebar Tests' , function ( ) {
46 // Tests
57 // ---------------------------------------------------------------------------
68 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' ) ;
1223 } ) ;
1324} ) ;
You can’t perform that action at this time.
0 commit comments