Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Multiple Console Sessions Feature Flag for Web #6410

Merged
merged 5 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { localize } from '../../../../nls.js';
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
import { ConfigurationScope, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { positronConfigurationNodeBase } from '../../languageRuntime/common/languageRuntime.js';

Expand Down Expand Up @@ -33,7 +33,6 @@ const configurationRegistry = Registry.as<IConfigurationRegistry>(
);
configurationRegistry.registerConfiguration({
...positronConfigurationNodeBase,
scope: ConfigurationScope.MACHINE_OVERRIDABLE,
properties: {
[USE_POSITRON_MULTIPLE_CONSOLE_SESSIONS_CONFIG_KEY]: {
type: 'boolean',
Expand Down
15 changes: 10 additions & 5 deletions test/e2e/pages/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,13 @@ export class Console {
}

async clickConsoleTab() {
await this.code.driver.page.locator('.basepanel').getByRole('tab', { name: 'Console', exact: true }).locator('a').click();
// Move mouse to prevent tooltip hover
await this.code.driver.page.mouse.move(0, 0);
// sometimes the click doesn't seem to work, so adding a retry
await expect(async () => {
await this.code.driver.page.locator('.basepanel').getByRole('tab', { name: 'Console', exact: true }).locator('a').click();
// Move mouse to prevent tooltip hover
await this.code.driver.page.mouse.move(0, 0);
await expect(this.code.driver.page.getByRole('tab', { name: 'Console', exact: true })).toHaveClass('action-item checked');
}).toPass();
}

async interruptExecution() {
Expand Down Expand Up @@ -360,7 +364,8 @@ class Session {
// Todo: https://github.com/posit-dev/positron/issues/6389
// Todo: remove when menu closes on click as expected
await this.page.keyboard.press('Escape');
await this.page.keyboard.press(process.platform === 'darwin' ? 'Meta+ArrowUp' : 'Control+Home');
await expect(this.page.getByRole('tab', { name: 'Output' })).toHaveClass('action-item checked');
await this.page.keyboard.press('Home');
await expect(this.page.getByText(`Begin kernel log for session ${data.language} ${data.version}`)).toBeVisible();

// Todo: https://github.com/posit-dev/positron/issues/6149
Expand Down Expand Up @@ -441,7 +446,7 @@ class Session {
async ensureStartedAndIdle(session: SessionDetails): Promise<void> {
await test.step(`Ensure ${session.language} ${session.version} session is started and idle`, async () => {
// Start Session if it does not exist
const sessionExists = await this.getSessionLocator(session).isVisible();
const sessionExists = await this.getSessionLocator(session).isVisible({ timeout: 30000 });
if (!sessionExists) {
await this.console.selectInterpreter(session.language === 'Python' ? InterpreterType.Python : InterpreterType.R, session.version);
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/console/console-sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.use({
});

test.describe('Console: Sessions', {
tag: [tags.WIN, tags.CONSOLE, tags.SESSIONS]
tag: [tags.WIN, tags.WEB, tags.CONSOLE, tags.SESSIONS]
}, () => {

test.beforeAll(async function ({ userSettings }) {
Expand Down