-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add electron tests #28
Conversation
62ccbe6
to
3685880
Compare
c4cc3a8
to
8ff3f08
Compare
bddfe24
to
5c31aa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! Looks good overall, just a few initial inline comments that caught my attention when looking through the change. Thank you!
.github/workflows/main.yml
Outdated
python-version: "3.11" | ||
|
||
- name: Test (playwright electron) | ||
uses: GabrielBB/xvfb-action@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably avoid using this GH action, as it is deprecated.
.github/workflows/performance.yml
Outdated
with: | ||
node-version: "16.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Use Python 3.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to pin this to version 3.11?
5c31aa0
to
969c59e
Compare
I also noticed that we currently use several different versions of actions in the workflows (e.g., v2, v3, and v4 of checkout). If that is ok, I would create a follow-up PR to fix this while at the same time replacing the (mutable) tags with commit hashes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @xai! This looks great so far. I'm eager to try it on the CI infrastructure.
Aside from a minor comment inline I just wanted to double-check the following questions:
- Do we keep the history of the browser performance tests when switching base directory or is there something we need to do?
- How does it impact the allure reports when both browser and electron write into the same allure-results folders before we generate the allure report? Are they then both showing up in the report or does one override the other?
- Can we push a simple
performance/index.html
with two links that point toperformance/Browser
andperformance/Electron
to allow people who still may have the old link to navigate to the reports instead of getting a 404? Or would that be cumebrsome? - As a follow-up we should also update the readme and modify/add the badge to point to both of the performance pages.
tests/theia-text-editor.test.ts
Outdated
if (app.isElectron) { | ||
const explorer = await app.openView(TheiaExplorerView); | ||
await explorer.waitForVisibleFileNodes(); | ||
console.log(`app.workspace.path = ${app.workspace.path}`); | ||
const workspaceBasename = app.workspace.path.split('/').pop(); | ||
if (workspaceBasename) { | ||
await app.page.getByText(workspaceBasename).click(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe extract this into an own function that takes the app
as a parameter to avoid repeating this code in several tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, I will adjust the PR!
969c59e
to
754f50a
Compare
* Update theia dependency to 1.46.1 * Use new TheiaApploader * Add workaround for Electron playwright multi root issue * Support different projects (e.g., chromium or Electron) in performance reports * Remove dependency to deprecated xvfb-action Contributed on behalf of STMicroelectronics Signed-off-by: Olaf Lessenich <[email protected]>
754f50a
to
f4e2ce0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update! Looks good now.
As discussed offline, the allure reporting should be combined automatically and to maintain the history of the performance metrics, we'll adjust the gh_pages branch after merging accordingly.
The electron performance tests depend on Theia > 1.46.1 because they need to access the metrics endpoint.