@theia/playwright 1.59.0 → 1.60.0-next.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/playwright",
3
- "version": "1.59.0",
3
+ "version": "1.60.0-next.43+2a13720d2",
4
4
  "description": "System tests for Theia",
5
5
  "license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "fs-extra": "^9.0.8"
36
36
  },
37
37
  "devDependencies": {
38
- "@theia/cli": "1.59.0",
38
+ "@theia/cli": "1.60.0-next.43+2a13720d2",
39
39
  "@types/fs-extra": "^9.0.8",
40
40
  "allure-commandline": "^2.23.1",
41
41
  "allure-playwright": "^2.5.0",
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "main": "lib/index",
50
- "gitHead": "21358137e41342742707f660b8e222f940a27652"
50
+ "gitHead": "2a13720d2d41d8ae6ee4e34cd2dee1c656a18018"
51
51
  }
package/src/theia-app.ts CHANGED
@@ -176,7 +176,7 @@ export class TheiaApp {
176
176
  }
177
177
 
178
178
  protected async visibleTabIds(): Promise<string[]> {
179
- const tabs = await this.page.$$('.p-TabBar-tab');
179
+ const tabs = await this.page.$$('.lm-TabBar-tab');
180
180
  const tabIds = (await Promise.all(tabs.map(tab => tab.getAttribute('id')))).filter(id => !!id);
181
181
  return tabIds as string[];
182
182
  }
@@ -176,7 +176,7 @@ export class TheiaExplorerView extends TheiaView {
176
176
  if (await this.isTreeNodeSelected(filePath)) {
177
177
  await treeNode.focus();
178
178
  } else {
179
- await treeNode.click({ modifiers: ['Control'] });
179
+ await treeNode.click({ modifiers: [OSUtil.isMacOS ? 'Meta' : 'Control'] });
180
180
  // make sure the click has been acted-upon before returning
181
181
  while (!await this.isTreeNodeSelected(filePath)) {
182
182
  console.debug('Waiting for clicked tree node to be selected: ' + filePath);
@@ -21,7 +21,7 @@ import { TheiaPageObject } from './theia-page-object';
21
21
  import { normalizeId, toTextContentArray } from './util';
22
22
 
23
23
  export class TheiaMainMenu extends TheiaMenu {
24
- override selector = '.p-Menu.p-MenuBar-menu';
24
+ override selector = '.lm-Menu.lm-MenuBar-menu';
25
25
  }
26
26
 
27
27
  export class TheiaMenuBar extends TheiaPageObject {
@@ -48,7 +48,7 @@ export class TheiaMenuBar extends TheiaPageObject {
48
48
  }
49
49
 
50
50
  protected menuBarItemSelector(label = ''): string {
51
- return `${normalizeId('#theia:menubar')} .p-MenuBar-itemLabel >> text=${label}`;
51
+ return `${normalizeId('#theia:menubar')} .lm-MenuBar-itemLabel >> text=${label}`;
52
52
  }
53
53
 
54
54
  }
@@ -23,15 +23,15 @@ export class TheiaMenuItem {
23
23
  constructor(protected element: ElementHandle<SVGElement | HTMLElement>) { }
24
24
 
25
25
  protected labelElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement>> {
26
- return this.element.waitForSelector('.p-Menu-itemLabel');
26
+ return this.element.waitForSelector('.lm-Menu-itemLabel');
27
27
  }
28
28
 
29
29
  protected shortCutElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement>> {
30
- return this.element.waitForSelector('.p-Menu-itemShortcut');
30
+ return this.element.waitForSelector('.lm-Menu-itemShortcut');
31
31
  }
32
32
 
33
33
  protected isHidden(): Promise<boolean> {
34
- return elementContainsClass(this.element, 'p-mod-collapsed');
34
+ return elementContainsClass(this.element, 'lm-mod-collapsed');
35
35
  }
36
36
 
37
37
  async label(): Promise<string | undefined> {
@@ -60,11 +60,11 @@ export class TheiaMenuItem {
60
60
  if (classAttribute === undefined || classAttribute === null) {
61
61
  return false;
62
62
  }
63
- return !classAttribute.includes('p-mod-disabled') && !classAttribute.includes('p-mod-collapsed');
63
+ return !classAttribute.includes('lm-mod-disabled') && !classAttribute.includes('lm-mod-collapsed');
64
64
  }
65
65
 
66
66
  async click(): Promise<void> {
67
- return this.element.waitForSelector('.p-Menu-itemLabel')
67
+ return this.element.waitForSelector('.lm-Menu-itemLabel')
68
68
  .then(labelElement => labelElement.click({ position: { x: 10, y: 10 } }));
69
69
  }
70
70
 
package/src/theia-menu.ts CHANGED
@@ -22,7 +22,7 @@ import { isDefined } from './util';
22
22
 
23
23
  export class TheiaMenu extends TheiaPageObject {
24
24
 
25
- selector = '.p-Menu';
25
+ selector = '.lm-Menu';
26
26
 
27
27
  protected async menuElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement> | null> {
28
28
  return this.page.$(this.selector);
@@ -50,7 +50,7 @@ export class TheiaMenu extends TheiaPageObject {
50
50
  if (!menuHandle) {
51
51
  return [];
52
52
  }
53
- const items = await menuHandle.$$('.p-Menu-content .p-Menu-item');
53
+ const items = await menuHandle.$$('.lm-Menu-content .lm-Menu-item');
54
54
  return items.map(element => new TheiaMenuItem(element));
55
55
  }
56
56
 
@@ -84,7 +84,7 @@ export class TheiaMenu extends TheiaPageObject {
84
84
  }
85
85
 
86
86
  protected menuItemSelector(label = ''): string {
87
- return `.p-Menu-content .p-Menu-itemLabel >> text=${label}`;
87
+ return `.lm-Menu-content .lm-Menu-itemLabel >> text=${label}`;
88
88
  }
89
89
 
90
90
  async visibleMenuItems(): Promise<string[]> {
@@ -47,7 +47,7 @@ export class TheiaOutputView extends TheiaView {
47
47
  await this.activate();
48
48
  const channel = new TheiaOutputViewChannel(
49
49
  {
50
- viewSelector: 'div.p-Widget.theia-editor.p-DockPanel-widget > div.monaco-editor',
50
+ viewSelector: 'div.lm-Widget.theia-editor.lm-DockPanel-widget > div.monaco-editor',
51
51
  dataUri: normalizeId(`output:/${encodeURIComponent(outputChannelName)}`),
52
52
  channelName: outputChannelName
53
53
  },
@@ -106,7 +106,7 @@ export class TheiaPreferenceView extends TheiaView {
106
106
  }
107
107
 
108
108
  protected getScopeSelector(scope: TheiaPreferenceScope): string {
109
- return `li.preferences-scope-tab div.p-TabBar-tabLabel:has-text("${scope}")`;
109
+ return `li.preferences-scope-tab div.lm-TabBar-tabLabel:has-text("${scope}")`;
110
110
  }
111
111
 
112
112
  async openPreferenceScope(scope: TheiaPreferenceScope): Promise<void> {
@@ -19,7 +19,7 @@ import { TheiaPageObject } from './theia-page-object';
19
19
  import { TheiaToolbarItem } from './theia-toolbar-item';
20
20
 
21
21
  export class TheiaToolbar extends TheiaPageObject {
22
- selector = 'div#main-toolbar.p-TabBar-toolbar';
22
+ selector = 'div#main-toolbar.lm-TabBar-toolbar';
23
23
 
24
24
  protected async toolbarElementHandle(): Promise<ElementHandle<SVGElement | HTMLElement> | null> {
25
25
  return this.page.$(this.selector);
package/src/theia-view.ts CHANGED
@@ -84,11 +84,11 @@ export class TheiaView extends TheiaPageObject {
84
84
  }
85
85
 
86
86
  async isActive(): Promise<boolean> {
87
- return await this.isTabVisible() && containsClass(this.tabElement(), 'p-mod-current');
87
+ return await this.isTabVisible() && containsClass(this.tabElement(), 'lm-mod-current');
88
88
  }
89
89
 
90
90
  async isClosable(): Promise<boolean> {
91
- return await this.isTabVisible() && containsClass(this.tabElement(), 'p-mod-closable');
91
+ return await this.isTabVisible() && containsClass(this.tabElement(), 'lm-mod-closable');
92
92
  }
93
93
 
94
94
  async close(waitForClosed = true): Promise<void> {
@@ -101,7 +101,7 @@ export class TheiaView extends TheiaPageObject {
101
101
  const tab = await this.tabElement();
102
102
  const side = await this.side();
103
103
  if (side === 'main' || side === 'bottom') {
104
- const closeIcon = await tab?.waitForSelector('div.p-TabBar-tabCloseIcon');
104
+ const closeIcon = await tab?.waitForSelector('div.lm-TabBar-tabCloseIcon');
105
105
  await closeIcon?.click();
106
106
  } else {
107
107
  const menu = await this.openContextMenuOnTab();
@@ -130,7 +130,7 @@ export class TheiaView extends TheiaPageObject {
130
130
  }
131
131
  const tab = await this.tabElement();
132
132
  if (tab) {
133
- return textContent(tab.waitForSelector('div.theia-tab-icon-label > div.p-TabBar-tabLabel'));
133
+ return textContent(tab.waitForSelector('div.theia-tab-icon-label > div.lm-TabBar-tabLabel'));
134
134
  }
135
135
  return undefined;
136
136
  }