mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
This commit is contained in:
parent
357cae1b11
commit
43946cb12b
2 changed files with 38 additions and 1 deletions
|
@ -17,6 +17,7 @@ export default function searchFunctonalTests({ getService, getPageObjects }: Tes
|
|||
|
||||
describe('Search', () => {
|
||||
const symbolTypeaheadListSelector = 'codeTypeaheadList-symbol codeTypeaheadItem';
|
||||
const fileTypeaheadListSelector = 'codeTypeaheadList-file codeTypeaheadItem';
|
||||
const searchResultListSelector = 'codeSearchResultList codeSearchResultFileItem';
|
||||
const languageFilterListSelector = 'codeSearchLanguageFilterList codeSearchLanguageFilterItem';
|
||||
|
||||
|
@ -36,7 +37,6 @@ export default function searchFunctonalTests({ getService, getPageObjects }: Tes
|
|||
|
||||
it('Trigger symbols in typeahead', async () => {
|
||||
log.debug('Trigger symbols in typeahead');
|
||||
// Fill in the search query bar with a common prefix of symbols.
|
||||
await PageObjects.code.fillSearchQuery('user');
|
||||
|
||||
await retry.tryForTime(5000, async () => {
|
||||
|
@ -48,6 +48,27 @@ export default function searchFunctonalTests({ getService, getPageObjects }: Tes
|
|||
});
|
||||
});
|
||||
|
||||
it('File typeahead should be case insensitive', async () => {
|
||||
log.debug('File typeahead should be case insensitive');
|
||||
await PageObjects.code.fillSearchQuery('LICENSE');
|
||||
|
||||
await retry.tryForTime(5000, async () => {
|
||||
const symbols = await testSubjects.findAll(fileTypeaheadListSelector);
|
||||
expect(symbols).to.have.length(1);
|
||||
|
||||
expect(await symbols[0].getVisibleText()).to.equal('LICENSE');
|
||||
});
|
||||
|
||||
await PageObjects.code.fillSearchQuery('license');
|
||||
|
||||
await retry.tryForTime(5000, async () => {
|
||||
const symbols = await testSubjects.findAll(fileTypeaheadListSelector);
|
||||
expect(symbols).to.have.length(1);
|
||||
|
||||
expect(await symbols[0].getVisibleText()).to.equal('LICENSE');
|
||||
});
|
||||
});
|
||||
|
||||
it('Full text search', async () => {
|
||||
log.debug('Full text search');
|
||||
// Fill in the search query bar with a common prefix of symbols.
|
||||
|
|
|
@ -197,3 +197,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "_doc",
|
||||
"value": {
|
||||
"index": ".code-document-github.com-microsoft-typescript-node-starter-1",
|
||||
"type": "_doc",
|
||||
"id": "4SdMKGsBCG9E0p-YOgIC",
|
||||
"source": {
|
||||
"repoUri": "github.com/Microsoft/TypeScript-Node-Starter",
|
||||
"path": "LICENSE",
|
||||
"content": " MIT License\r\n\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE\r\n",
|
||||
"language": "other",
|
||||
"qnames": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue