mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
Add simple terminal sticky scroll smoke test
This commit is contained in:
parent
0bbbea7680
commit
64ac05a2e9
38
test/smoke/src/areas/terminal/terminal-stickyScroll.test.ts
Normal file
38
test/smoke/src/areas/terminal/terminal-stickyScroll.test.ts
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import { Application, Terminal, SettingsEditor } from '../../../../automation';
|
||||||
|
import { setTerminalTestSettings } from './terminal-helpers';
|
||||||
|
|
||||||
|
export function setup() {
|
||||||
|
describe('Terminal stickyScroll', () => {
|
||||||
|
// Acquire automation API
|
||||||
|
let app: Application;
|
||||||
|
let terminal: Terminal;
|
||||||
|
let settingsEditor: SettingsEditor;
|
||||||
|
before(async function () {
|
||||||
|
app = this.app as Application;
|
||||||
|
terminal = app.workbench.terminal;
|
||||||
|
settingsEditor = app.workbench.settingsEditor;
|
||||||
|
await setTerminalTestSettings(app, [
|
||||||
|
['terminal.integrated.enableStickyScroll', 'true']
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
after(async function () {
|
||||||
|
await settingsEditor.clearUserSettings();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should inherit cwd when split and update the tab description - alt click', async () => {
|
||||||
|
// There should not be a visible sticky scroll element initially
|
||||||
|
await terminal.createTerminal();
|
||||||
|
await app.code.waitForElements('.terminal-sticky-scroll', false, elements => elements.length === 0);
|
||||||
|
|
||||||
|
// Running ls should show the sticky scroll element
|
||||||
|
await terminal.runCommandInTerminal(`ls`);
|
||||||
|
await app.code.waitForElements('.terminal-sticky-scroll', false, elements => elements.length === 1 && elements[0].textContent.indexOf('ls') >= 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import { setup as setupTerminalPersistenceTests } from './terminal-persistence.t
|
||||||
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
|
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
|
||||||
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';
|
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';
|
||||||
import { setup as setupTerminalSplitCwdTests } from './terminal-splitCwd.test';
|
import { setup as setupTerminalSplitCwdTests } from './terminal-splitCwd.test';
|
||||||
|
import { setup as setupTerminalStickyScrollTests } from './terminal-stickyScroll.test';
|
||||||
import { setup as setupTerminalShellIntegrationTests } from './terminal-shellIntegration.test';
|
import { setup as setupTerminalShellIntegrationTests } from './terminal-shellIntegration.test';
|
||||||
|
|
||||||
export function setup(logger: Logger) {
|
export function setup(logger: Logger) {
|
||||||
|
@ -41,6 +42,7 @@ export function setup(logger: Logger) {
|
||||||
setupTerminalProfileTests();
|
setupTerminalProfileTests();
|
||||||
setupTerminalTabsTests();
|
setupTerminalTabsTests();
|
||||||
setupTerminalShellIntegrationTests();
|
setupTerminalShellIntegrationTests();
|
||||||
|
setupTerminalStickyScrollTests();
|
||||||
if (!process.platform.startsWith('win')) {
|
if (!process.platform.startsWith('win')) {
|
||||||
setupTerminalSplitCwdTests();
|
setupTerminalSplitCwdTests();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue