Skip to content

Commit

Permalink
Adapt to latest Theia version
Browse files Browse the repository at this point in the history
Following this recent Theia commit [1], one now has to use "TheiaAppLoader.load()",
to load a Theia application in a theia playwright template. Some code here needs to
be updated.

Also, use the latest versions (as of now) for @theia/playwright and @playwright/test

[1]: "Basic playwright electron support (#12207)"
eclipse-theia/theia@487e92b

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
  • Loading branch information
marcdumais-work committed Mar 14, 2024
1 parent d30db09 commit 1cb5cb9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"ui-tests-report": "yarn ui-tests-report-generate && allure open allure-results/allure-report"
},
"dependencies": {
"@playwright/test": "^1.32.1",
"@theia/playwright": "next"
"@playwright/test": "^1.42.1",
"@theia/playwright": "1.47.1"
},
"devDependencies": {
"@typescript-eslint/parser": "^5.57.1",
Expand Down
13 changes: 8 additions & 5 deletions tests/theia-app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { expect, Page, test } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { MyTheiaApp } from './page-objects/theia-app';
import { TheiaAppLoader } from '@theia/playwright';

let page: Page;
let app: MyTheiaApp;

test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
app = await MyTheiaApp.loadApp(page, MyTheiaApp);
test.beforeAll(async ({ playwright, browser }) => {
app = await TheiaAppLoader.load(
{ playwright, browser },
undefined,
MyTheiaApp
);
});

test.describe('My Theia application', () => {
Expand Down
45 changes: 23 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,19 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@playwright/test@^1.32.1":
version "1.32.2"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.32.2.tgz#3cbd76b3f94d0f7f50bf054dbd02e504e85e3865"
integrity sha512-nhaTSDpEdTTttdkDE8Z6K3icuG1DVRxrl98Qq0Lfc63SS9a2sjc9+x8ezysh7MzCKz6Y+nArml3/mmt+gqRmQQ==
"@playwright/test@^1.37.1", "@playwright/test@^1.42.1":
version "1.42.1"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.42.1.tgz#9eff7417bcaa770e9e9a00439e078284b301f31c"
integrity sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ==
dependencies:
"@types/node" "*"
playwright-core "1.32.2"
optionalDependencies:
fsevents "2.3.2"
playwright "1.42.1"

"@theia/playwright@next":
version "1.37.0-next.9"
resolved "https://registry.yarnpkg.com/@theia/playwright/-/playwright-1.37.0-next.9.tgz#8f1b24b579cb401fd97f1d1e2286f06a5b895753"
integrity sha512-GHQgw0Y+5Gqyfum+tintWSArkv/bQFb9d5PE+gAfY1i3ps5S3j1oifyckve1guNfz6DPSP3gzQD8PewwVDZ4+w==
"@theia/playwright@1.47.1":
version "1.47.1"
resolved "https://registry.yarnpkg.com/@theia/playwright/-/playwright-1.47.1.tgz#d053d3309bf5b520d92d718c665c417f57ac8e84"
integrity sha512-JJS1BF+dZFaiVhgRlAmzPFQ2euIUH/dSXiL5fFH0LvwO+WkdUJf3rw46VJhQFKHkNf/Fv/wxenKRGb1UDgtdcw==
dependencies:
"@playwright/test" "^1.32.1"
"@playwright/test" "^1.37.1"
fs-extra "^9.0.8"

"@types/json-schema@^7.0.9":
Expand All @@ -102,11 +99,6 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==

"@types/node@*":
version "17.0.25"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448"
integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==

"@types/semver@^7.3.12":
version "7.3.13"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
Expand Down Expand Up @@ -1259,10 +1251,19 @@ picomatch@^2.3.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

playwright-core@1.32.2:
version "1.32.2"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.32.2.tgz#608810c3c4486fb86a224732ac0d3560a96ded8b"
integrity sha512-zD7aonO+07kOTthsrCR3YCVnDcqSHIJpdFUtZEMOb6//1Rc7/6mZDRdw+nlzcQiQltOOsiqI3rrSyn/SlyjnJQ==
playwright-core@1.42.1:
version "1.42.1"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.42.1.tgz#13c150b93c940a3280ab1d3fbc945bc855c9459e"
integrity sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==

playwright@1.42.1:
version "1.42.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.42.1.tgz#79c828b51fe3830211137550542426111dc8239f"
integrity sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg==
dependencies:
playwright-core "1.42.1"
optionalDependencies:
fsevents "2.3.2"

prelude-ls@^1.2.1:
version "1.2.1"
Expand Down

0 comments on commit 1cb5cb9

Please sign in to comment.