mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix search smoketest - use span for all searchview messages and fix selector
Fix #89795
This commit is contained in:
parent
d1fca9d427
commit
f550dcc7ba
|
@ -1543,7 +1543,7 @@ export class SearchView extends ViewPane {
|
|||
|
||||
if (this.searchConfig.enableSearchEditorPreview) {
|
||||
dom.append(messageEl, $('span', undefined, resultMsg + ' - '));
|
||||
const span = dom.append(messageEl, $('span', undefined));
|
||||
const span = dom.append(messageEl, $('span'));
|
||||
const openInEditorLink = dom.append(span, $('a.pointer.prominent', undefined, nls.localize('openInEditor.message', "Open in editor")));
|
||||
|
||||
openInEditorLink.title = appendKeyBindingLabel(
|
||||
|
@ -1556,7 +1556,7 @@ export class SearchView extends ViewPane {
|
|||
}));
|
||||
|
||||
} else {
|
||||
dom.append(messageEl, $('p', undefined, resultMsg));
|
||||
dom.append(messageEl, $('span', undefined, resultMsg));
|
||||
}
|
||||
this.reLayout();
|
||||
} else if (!msgWasHidden) {
|
||||
|
|
|
@ -109,11 +109,12 @@ export class Search extends Viewlet {
|
|||
}
|
||||
|
||||
async waitForResultText(text: string): Promise<void> {
|
||||
await this.code.waitForTextContent(`${VIEWLET} .messages .message>p`, text);
|
||||
// The label can end with " - " depending on whether the search editor is enabled
|
||||
await this.code.waitForTextContent(`${VIEWLET} .messages .message>span`, undefined, result => result.startsWith(text));
|
||||
}
|
||||
|
||||
async waitForNoResultText(): Promise<void> {
|
||||
await this.code.waitForElement(`${VIEWLET} .messages[aria-hidden="true"] .message>p`);
|
||||
await this.code.waitForElement(`${VIEWLET} .messages[aria-hidden="true"] .message>span`);
|
||||
}
|
||||
|
||||
private async waitForInputFocus(selector: string): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue