mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Disable terminal tests that depend on terminal being hidden or shown in the past
This commit is contained in:
@@ -274,52 +274,52 @@ suite('window namespace tests', () => {
|
||||
const terminal = window.createTerminal({ name: 'foo', pty });
|
||||
});
|
||||
|
||||
test('should not provide dimensions on start as the terminal has not been shown yet', (done) => {
|
||||
const reg1 = window.onDidOpenTerminal(term => {
|
||||
equal(terminal, term);
|
||||
reg1.dispose();
|
||||
});
|
||||
const pty: Pseudoterminal = {
|
||||
onDidWrite: new EventEmitter<string>().event,
|
||||
open: (dimensions) => {
|
||||
equal(dimensions, undefined);
|
||||
const reg3 = window.onDidCloseTerminal(() => {
|
||||
reg3.dispose();
|
||||
done();
|
||||
});
|
||||
// Show a terminal and wait a brief period before dispose, this will cause
|
||||
// the panel to init it's dimenisons and be provided to following terminals.
|
||||
// The following test depends on this.
|
||||
terminal.show();
|
||||
setTimeout(() => terminal.dispose(), 200);
|
||||
},
|
||||
close: () => {}
|
||||
};
|
||||
const terminal = window.createTerminal({ name: 'foo', pty });
|
||||
});
|
||||
|
||||
test('should provide dimensions on start as the terminal has been shown', (done) => {
|
||||
const reg1 = window.onDidOpenTerminal(term => {
|
||||
equal(terminal, term);
|
||||
reg1.dispose();
|
||||
});
|
||||
const pty: Pseudoterminal = {
|
||||
onDidWrite: new EventEmitter<string>().event,
|
||||
open: (dimensions) => {
|
||||
// This test depends on Terminal.show being called some time before such
|
||||
// that the panel dimensions are initialized and cached.
|
||||
ok(dimensions!.columns > 0);
|
||||
ok(dimensions!.rows > 0);
|
||||
const reg3 = window.onDidCloseTerminal(() => {
|
||||
reg3.dispose();
|
||||
done();
|
||||
});
|
||||
terminal.dispose();
|
||||
},
|
||||
close: () => {}
|
||||
};
|
||||
const terminal = window.createTerminal({ name: 'foo', pty });
|
||||
});
|
||||
// The below tests depend on global UI state and each other
|
||||
// test('should not provide dimensions on start as the terminal has not been shown yet', (done) => {
|
||||
// const reg1 = window.onDidOpenTerminal(term => {
|
||||
// equal(terminal, term);
|
||||
// reg1.dispose();
|
||||
// });
|
||||
// const pty: Pseudoterminal = {
|
||||
// onDidWrite: new EventEmitter<string>().event,
|
||||
// open: (dimensions) => {
|
||||
// equal(dimensions, undefined);
|
||||
// const reg3 = window.onDidCloseTerminal(() => {
|
||||
// reg3.dispose();
|
||||
// done();
|
||||
// });
|
||||
// // Show a terminal and wait a brief period before dispose, this will cause
|
||||
// // the panel to init it's dimenisons and be provided to following terminals.
|
||||
// // The following test depends on this.
|
||||
// terminal.show();
|
||||
// setTimeout(() => terminal.dispose(), 200);
|
||||
// },
|
||||
// close: () => {}
|
||||
// };
|
||||
// const terminal = window.createTerminal({ name: 'foo', pty });
|
||||
// });
|
||||
// test('should provide dimensions on start as the terminal has been shown', (done) => {
|
||||
// const reg1 = window.onDidOpenTerminal(term => {
|
||||
// equal(terminal, term);
|
||||
// reg1.dispose();
|
||||
// });
|
||||
// const pty: Pseudoterminal = {
|
||||
// onDidWrite: new EventEmitter<string>().event,
|
||||
// open: (dimensions) => {
|
||||
// // This test depends on Terminal.show being called some time before such
|
||||
// // that the panel dimensions are initialized and cached.
|
||||
// ok(dimensions!.columns > 0);
|
||||
// ok(dimensions!.rows > 0);
|
||||
// const reg3 = window.onDidCloseTerminal(() => {
|
||||
// reg3.dispose();
|
||||
// done();
|
||||
// });
|
||||
// terminal.dispose();
|
||||
// },
|
||||
// close: () => {}
|
||||
// };
|
||||
// const terminal = window.createTerminal({ name: 'foo', pty });
|
||||
// });
|
||||
|
||||
test('should respect dimension overrides', (done) => {
|
||||
const reg1 = window.onDidOpenTerminal(term => {
|
||||
|
||||
Reference in New Issue
Block a user