mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 22:37:41 +00:00
Enable suggest tests on mac and Linux
This commit is contained in:
parent
0a4b2fc292
commit
5a4c5dd3a8
|
@ -21,11 +21,12 @@ import { TerminalSuggestCommandId } from 'vs/workbench/contrib/terminalContrib/s
|
|||
import type { ITerminalSuggestConfiguration } from 'vs/workbench/contrib/terminalContrib/suggest/common/terminalSuggestConfiguration';
|
||||
import { workbenchInstantiationService } from 'vs/workbench/test/browser/workbenchTestServices';
|
||||
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { events as windows11_pwsh_getcontent_delete_ghost } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_getcontent_delete_ghost';
|
||||
import { events as windows11_pwsh_getcontent_file } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_getcontent_file';
|
||||
import { events as windows11_pwsh_input_ls_complete_ls } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_input_ls_complete_ls';
|
||||
import { events as windows11_pwsh_namespace_completion } from 'vs/workbench/contrib/terminalContrib/suggest/test/browser/recordings/windows11_pwsh_namespace_completion';
|
||||
import { timeout } from 'vs/base/common/async';
|
||||
|
||||
const recordedTestCases: { name: string; events: RecordedSessionEvent[] }[] = [
|
||||
{ name: 'windows11_pwsh_getcontent_delete_ghost', events: windows11_pwsh_getcontent_delete_ghost as any as RecordedSessionEvent[] },
|
||||
|
@ -52,8 +53,7 @@ interface IRecordedSessionResizeEvent {
|
|||
rows: number;
|
||||
}
|
||||
|
||||
// DEBT: It's not clear why this doesn't play nicely on Linux
|
||||
(isWindows ? suite : suite.skip)('Terminal Contrib Suggest Recordings', () => {
|
||||
suite('Terminal Contrib Suggest Recordings', () => {
|
||||
const store = ensureNoDisposablesAreLeakedInTestSuite();
|
||||
|
||||
let xterm: Terminal;
|
||||
|
@ -113,10 +113,8 @@ interface IRecordedSessionResizeEvent {
|
|||
}
|
||||
case 'output': {
|
||||
await new Promise<void>(r => xterm.write(event.data, () => r()));
|
||||
// HACK: On Windows if the output contains the command start sequence, allow time for the
|
||||
// prompt to get adjusted. Eventually we should be able to remove this, but right now
|
||||
// a pause is required.
|
||||
if (isWindows && event.data.includes('\x1b]633;B')) {
|
||||
// If the output contains the command start sequence, allow time for the prompt to get adjusted.
|
||||
if (event.data.includes('\x1b]633;B')) {
|
||||
const commandDetection = capabilities.get(TerminalCapability.CommandDetection);
|
||||
if (commandDetection) {
|
||||
await new Promise<void>(r => {
|
||||
|
|
Loading…
Reference in a new issue