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

Migrate from PhosphorJS to Lumino #14320

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions configs/mocharc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require:
- 'ignore-styles'
- 'reflect-metadata/Reflect'
- '@theia/test-setup'
reporter: 'spec'
watch-files:
- '**/*.js'
Expand Down
167 changes: 167 additions & 0 deletions dev-packages/cli/patches/@lumino+widgets+2.5.0.patch

Large diffs are not rendered by default.

157 changes: 0 additions & 157 deletions dev-packages/cli/patches/@phosphor+widgets+1.9.3.patch

This file was deleted.

2 changes: 1 addition & 1 deletion dev-packages/cli/src/run-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default async function runTest(options: TestOptions): Promise<void> {
// When launching in non-headless mode (with a UI and dev-tools open), make sure
// the app has focus, to avoid failures of tests that query the UI's state.
if (launch && launch.devtools) {
promises.push(testPage.waitForSelector('#theia-app-shell.p-Widget.theia-ApplicationShell')
promises.push(testPage.waitForSelector('#theia-app-shell.lm-Widget.theia-ApplicationShell')
.then(e => {
// eslint-disable-next-line no-null/no-null
if (e !== null) {
Expand Down
32 changes: 32 additions & 0 deletions dev-packages/private-test-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div align='center'>

<br />

<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />

<h2>ECLIPSE THEIA - TEST SETUP</h2>

<hr />

</div>

## Description

The `@theia/test-setup` contributes a setup script for mocha executed tests in Theia.
This setup script is executed before any test file is loaded or compiled.
This is for example useful for globals which must exist before dependencies are loaded.

## Additional Information

- [Theia - GitHub](https://github.com/eclipse-theia/theia)
- [Theia - Website](https://theia-ide.org/)

## License

- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)

## Trademark

"Theia" is a trademark of the Eclipse Foundation
https://www.eclipse.org/theia
7 changes: 7 additions & 0 deletions dev-packages/private-test-setup/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"private": true,
"name": "@theia/test-setup",
"version": "1.56.0",
"description": "Custom setup for mocha tests",
"main": "test-setup.js"
}
18 changes: 18 additions & 0 deletions dev-packages/private-test-setup/test-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// *****************************************************************************
// Copyright (C) 2024 STMicroelectronics and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************

// Mock DragEvent as '@lumino/dragdrop' already requires it at require time
global.DragEvent = class DragEvent { };
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// *****************************************************************************

import { injectable, ContainerModule } from '@theia/core/shared/inversify';
import { Menu as MenuWidget } from '@theia/core/shared/@phosphor/widgets';
import { Menu as MenuWidget } from '@theia/core/shared/@lumino/widgets';
import { Disposable } from '@theia/core/lib/common/disposable';
import { MenuNode, CompoundMenuNode, MenuPath } from '@theia/core/lib/common/menu';
import { BrowserMainMenuFactory, MenuCommandRegistry, DynamicMenuWidget, BrowserMenuOptions } from '@theia/core/lib/browser/menu/browser-menu-plugin';
Expand Down Expand Up @@ -74,7 +74,7 @@ class SampleMenuCommandRegistry extends MenuCommandRegistry {
return this.addCommand(id, {
execute: () => { /* NOOP */ },
label: menu.label,
icon: menu.icon,
iconClass: menu.icon,
isEnabled: () => false,
isVisible: () => true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { inject, injectable, interfaces } from '@theia/core/shared/inversify';
import { FileService } from '@theia/filesystem/lib/browser/file-service';
import { WorkspaceService } from '@theia/workspace/lib/browser';
import { PreferenceItem, PreferenceValidationService } from '@theia/core/lib/browser';
import { JSONValue } from '@theia/core/shared/@phosphor/coreutils';
import { JSONValue } from '@theia/core/shared/@lumino/coreutils';
import { JsonType } from '@theia/core/lib/common/json-schema';
import { editorOptionsRegistry } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions';
import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider';
Expand Down
2 changes: 1 addition & 1 deletion examples/playwright/src/theia-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class TheiaApp {
}

protected async visibleTabIds(): Promise<string[]> {
const tabs = await this.page.$$('.p-TabBar-tab');
const tabs = await this.page.$$('.lm-TabBar-tab');
const tabIds = (await Promise.all(tabs.map(tab => tab.getAttribute('id')))).filter(id => !!id);
return tabIds as string[];
}
Expand Down
4 changes: 2 additions & 2 deletions examples/playwright/src/theia-main-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import { normalizeId, toTextContentArray } from './util';

export class TheiaMainMenu extends TheiaMenu {
override selector = '.p-Menu.p-MenuBar-menu';
override selector = '.lm-Menu.lm-MenuBar-menu';
}

export class TheiaMenuBar extends TheiaPageObject {
Expand All @@ -32,7 +32,7 @@
if (await mainMenu.isOpen()) {
await menuBarItem?.hover();
} else {
await menuBarItem?.click();

Check failure on line 35 in examples/playwright/src/theia-main-menu.ts

View workflow job for this annotation

GitHub Actions / Playwright Tests (ubuntu-22.04, Node.js 18.x)

../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File'

1) ../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File' ─ Error: elementHandle.click: Target page, context or browser has been closed Call log: - attempting click action - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #8 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #9 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #10 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #11 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #12 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #13 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #14 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #15 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #16 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #17 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #18 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #19 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #20 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #21 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #22 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #23 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, att

Check failure on line 35 in examples/playwright/src/theia-main-menu.ts

View workflow job for this annotation

GitHub Actions / Playwright Tests (ubuntu-22.04, Node.js 18.x)

../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File'

1) ../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File' ─ Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: elementHandle.click: Target page, context or browser has been closed Call log: - attempting click action - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #8 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #9 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #10 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #11 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #12 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #13 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #14 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #15 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #16 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #17 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #18 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #19 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #20 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #21 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #22 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #23 - waiting 500ms - waiting for element

Check failure on line 35 in examples/playwright/src/theia-main-menu.ts

View workflow job for this annotation

GitHub Actions / Playwright Tests (ubuntu-22.04, Node.js 18.x)

../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File'

1) ../../src/tests/theia-main-menu.test.ts:46:9 › Theia Main Menu › should open main menu 'File' ─ Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: elementHandle.click: Target page, context or browser has been closed Call log: - attempting click action - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #8 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #9 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #10 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #11 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #12 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #13 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #14 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #15 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #16 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #17 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #18 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #19 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #20 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #21 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #22 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #23 - waiting 500ms - waiting for element

Check failure on line 35 in examples/playwright/src/theia-main-menu.ts

View workflow job for this annotation

GitHub Actions / Playwright Tests (ubuntu-22.04, Node.js 18.x)

../../src/tests/theia-main-menu.test.ts:51:9 › Theia Main Menu › should show the menu items 'New Text File' and 'New Folder'

2) ../../src/tests/theia-main-menu.test.ts:51:9 › Theia Main Menu › should show the menu items 'New Text File' and 'New Folder' Error: elementHandle.click: Target page, context or browser has been closed Call log: - attempting click action - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #8 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #9 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #10 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #11 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #12 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #13 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #14 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #15 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #16 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #17 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #18 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #19 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #20 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #21 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #22 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #23 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled

Check failure on line 35 in examples/playwright/src/theia-main-menu.ts

View workflow job for this annotation

GitHub Actions / Playwright Tests (ubuntu-22.04, Node.js 18.x)

../../src/tests/theia-main-menu.test.ts:51:9 › Theia Main Menu › should show the menu items 'New Text File' and 'New Folder'

2) ../../src/tests/theia-main-menu.test.ts:51:9 › Theia Main Menu › should show the menu items 'New Text File' and 'New Folder' Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: elementHandle.click: Target page, context or browser has been closed Call log: - attempting click action - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #1 - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #2 - waiting 20ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #3 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #4 - waiting 100ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #5 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #6 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #7 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #8 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #9 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #10 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #11 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #12 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #13 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #14 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #15 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #16 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #17 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #18 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #19 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #20 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #21 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #22 - waiting 500ms - waiting for element to be visible, enabled and stable - element is not enabled - retrying click action, attempt #23 - waiting 500ms
}
mainMenu.waitForVisible();
return mainMenu;
Expand All @@ -48,7 +48,7 @@
}

protected menuBarItemSelector(label = ''): string {
return `${normalizeId('#theia:menubar')} .p-MenuBar-itemLabel >> text=${label}`;
return `${normalizeId('#theia:menubar')} .lm-MenuBar-itemLabel >> text=${label}`;
}

}
10 changes: 5 additions & 5 deletions examples/playwright/src/theia-menu-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export class TheiaMenuItem {
constructor(protected element: ElementHandle<SVGElement | HTMLElement>) { }

protected labelElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement>> {
return this.element.waitForSelector('.p-Menu-itemLabel');
return this.element.waitForSelector('.lm-Menu-itemLabel');
}

protected shortCutElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement>> {
return this.element.waitForSelector('.p-Menu-itemShortcut');
return this.element.waitForSelector('.lm-Menu-itemShortcut');
}

protected isHidden(): Promise<boolean> {
return elementContainsClass(this.element, 'p-mod-collapsed');
return elementContainsClass(this.element, 'lm-mod-collapsed');
}

async label(): Promise<string | undefined> {
Expand Down Expand Up @@ -60,11 +60,11 @@ export class TheiaMenuItem {
if (classAttribute === undefined || classAttribute === null) {
return false;
}
return !classAttribute.includes('p-mod-disabled') && !classAttribute.includes('p-mod-collapsed');
return !classAttribute.includes('lm-mod-disabled') && !classAttribute.includes('lm-mod-collapsed');
}

async click(): Promise<void> {
return this.element.waitForSelector('.p-Menu-itemLabel')
return this.element.waitForSelector('.lm-Menu-itemLabel')
.then(labelElement => labelElement.click({ position: { x: 10, y: 10 } }));
}

Expand Down
6 changes: 3 additions & 3 deletions examples/playwright/src/theia-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { isDefined } from './util';

export class TheiaMenu extends TheiaPageObject {

selector = '.p-Menu';
selector = '.lm-Menu';

protected async menuElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement> | null> {
return this.page.$(this.selector);
Expand Down Expand Up @@ -50,7 +50,7 @@ export class TheiaMenu extends TheiaPageObject {
if (!menuHandle) {
return [];
}
const items = await menuHandle.$$('.p-Menu-content .p-Menu-item');
const items = await menuHandle.$$('.lm-Menu-content .lm-Menu-item');
return items.map(element => new TheiaMenuItem(element));
}

Expand Down Expand Up @@ -84,7 +84,7 @@ export class TheiaMenu extends TheiaPageObject {
}

protected menuItemSelector(label = ''): string {
return `.p-Menu-content .p-Menu-itemLabel >> text=${label}`;
return `.lm-Menu-content .lm-Menu-itemLabel >> text=${label}`;
}

async visibleMenuItems(): Promise<string[]> {
Expand Down
2 changes: 1 addition & 1 deletion examples/playwright/src/theia-output-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class TheiaOutputView extends TheiaView {
await this.activate();
const channel = new TheiaOutputViewChannel(
{
viewSelector: 'div.p-Widget.theia-editor.p-DockPanel-widget > div.monaco-editor',
viewSelector: 'div.lm-Widget.theia-editor.lm-DockPanel-widget > div.monaco-editor',
dataUri: normalizeId(`output:/${encodeURIComponent(outputChannelName)}`),
channelName: outputChannelName
},
Expand Down
2 changes: 1 addition & 1 deletion examples/playwright/src/theia-preference-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class TheiaPreferenceView extends TheiaView {
}

protected getScopeSelector(scope: TheiaPreferenceScope): string {
return `li.preferences-scope-tab div.p-TabBar-tabLabel:has-text("${scope}")`;
return `li.preferences-scope-tab div.lm-TabBar-tabLabel:has-text("${scope}")`;
}

async openPreferenceScope(scope: TheiaPreferenceScope): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion examples/playwright/src/theia-toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { TheiaPageObject } from './theia-page-object';
import { TheiaToolbarItem } from './theia-toolbar-item';

export class TheiaToolbar extends TheiaPageObject {
selector = 'div#main-toolbar.p-TabBar-toolbar';
selector = 'div#main-toolbar.lm-TabBar-toolbar';

protected async toolbarElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement> | null> {
return this.page.$(this.selector);
Expand Down
Loading
Loading