-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
playwright: add page object for terminal #12381
playwright: add page object for terminal #12381
Conversation
f042cec
to
81a07eb
Compare
81a07eb
to
1a7791d
Compare
@planger Sorry for the delay in reviewing this PR. Looks good so far. I have taken the liberty of enabling the Playwright test suite on all OS by adding a temporary commit on top of your contribution and pushing the result on my fork: https://github.com/marcdumais-work/theia/actions/runs/4679291140 Windows and macOS have failed: Windows has an issue with the way THEIA_CONFIG_DIR is set in playwright package.json. On Mac, there's a failure in |
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.
LGTM - thanks @planger! The added infrastructure will make it easy to add more complex terminal tests later if needed.
@@ -1,5 +1,5 @@ | |||
// ***************************************************************************** | |||
// Copyright (C) 2021 logi.cals GmbH, EclipseSource and others. | |||
// Copyright (C) 2021-2023 logi.cals GmbH, EclipseSource and others. |
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.
Just FYI, it's not wrong to update the Copyright date, but as per EF guidance, we consider that git
is the source of truth, and so generally do not require this be done when an existing file is modified.
xterm uses a canvas to show the terminal contents. Thus, we use a workaround of selecting all contents and copying into the clipboard to read the output of the terminal. Contributed on behalf of STMicroelectronics Change-Id: I2840425ced9dfebf24f97b4302b44d73a6c9741c
1a7791d
to
55a2ec3
Compare
Thanks a lot for the review @marcdumais-work! I've created #12405 to track the issue on Windows and Mac. |
What it does
With this PR, we add a Playwright page object to interact with the terminal. The terminal (xterm) uses a canvas to show the terminal contents. Thus, we use a workaround of selecting all contents and copying into the clipboard to read the output of the terminal.
Contributed on behalf of STMicroelectronics
How to test
Aside from making sure the added test runs in the CI, it'd be great to test this also on Mac and Windows locally. I confirmed that it works on Linux.
Review checklist
Reminder for reviewers