-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-search-ie11
- Loading branch information
Showing
3 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const docsifyInit = require('../helpers/docsify-init'); | ||
|
||
describe(`Index file hosting`, function() { | ||
const sharedOptions = { | ||
config: { | ||
basePath: `${TEST_HOST}/docs/index.html#/`, | ||
}, | ||
testURL: `${TEST_HOST}/docs/index.html#/`, | ||
}; | ||
|
||
test('should serve from index file', async () => { | ||
await docsifyInit(sharedOptions); | ||
|
||
await expect(page).toHaveText( | ||
'#main', | ||
'A magical documentation site generator' | ||
); | ||
expect(page.url()).toMatch(/index\.html#\/$/); | ||
}); | ||
|
||
test('should use index file links in sidebar from index file hosting', async () => { | ||
await docsifyInit(sharedOptions); | ||
|
||
await page.click('a[href="#/quickstart"]'); | ||
await expect(page).toHaveText('#main', 'Quick start'); | ||
expect(page.url()).toMatch(/index\.html#\/quickstart$/); | ||
}); | ||
}); |