-
-
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.
fix: search on homepage test (#1398)
* fix: ci build * reset * test * update * fix test * fix * Add multi-page search test * rename Co-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
- Loading branch information
1 parent
c9d4f7a
commit ee550d0
Showing
2 changed files
with
38 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const docsifyInit = require('../helpers/docsify-init'); | ||
|
||
// Suite | ||
// ----------------------------------------------------------------------------- | ||
describe('Search Plugin Tests', function() { | ||
// Tests | ||
// --------------------------------------------------------------------------- | ||
test('search readme', async () => { | ||
const docsifyInitConfig = { | ||
markdown: { | ||
homepage: ` | ||
# Hello World | ||
This is the homepage. | ||
`, | ||
sidebar: ` | ||
- [Home page](/) | ||
- [Test Page](test) | ||
`, | ||
}, | ||
routes: { | ||
'/test.md': ` | ||
# Test Page | ||
This is a custom route. | ||
`, | ||
}, | ||
scriptURLs: ['/lib/plugins/search.min.js'], | ||
}; | ||
|
||
await docsifyInit(docsifyInitConfig); | ||
await page.fill('input[type=search]', 'hello'); | ||
await expect(page).toEqualText('.results-panel h2', 'Hello World'); | ||
await page.click('.clear-button'); | ||
await page.fill('input[type=search]', 'test'); | ||
await expect(page).toEqualText('.results-panel h2', 'Test Page'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
ee550d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: