Skip to content

Commit

Permalink
Fix Multiple Console Sessions Feature Flag for Web (#6410)
Browse files Browse the repository at this point in the history
### Release Notes
Addresses #6401 

The configuration scope for `console.multipleConsoleSessions` was set to
`MACHINE_OVERRIDABLE` which prevented enabling the feature flag as a
user setting in the Web build of Positron.

We do not require this scope so it has been removed and allows the
feature flag to be enabled which unblcosk CI testing for this new
feature!

#### New Features

- N/A

#### Bug Fixes

- N/A

### QA Notes
@:sessions @:web @:win

---------

Co-authored-by: Marie Idleman <marie.idleman@posit.co>
  • Loading branch information
dhruvisompura and midleman authored Feb 21, 2025
1 parent c4908fd commit 52583c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
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

0 comments on commit 52583c7

Please sign in to comment.