Add page object for WebviewView#855
Conversation
905a0b2 to
a7729f2
Compare
a920039 to
d49cea9
Compare
|
@djelinek If you have time, could you please review this PR? Also, where should I document the API change? It seems it's documented in the GitHub wiki, so should I make changes t the wiki directly, and if so, should I do this before/after the PR is merged? |
|
Thank you for your contribution. I just want to point out that, with this PR the tester will have 2 WebView page objects which raises the question whether it is really needed to have 2 page objects of the same kind. I do not mind doing semver major changes if it will improve WebView API. What do you think @datho7561 @djelinek? |
|
You're right, this page object can also be used with the editor webviews. However, the editor webview page object has a mechanism to ensure that the webview you are accessing is the intended one when there are mulitple webviews being displayed. I expect if you have an editor webview and a panel webview open, then my WebviewView implementation would sometimes access the editor webview. I'll see if I can add a similar mechanism to prevent the WebviewView from accessing editor webviews. |
|
I can't seem to find a similar |
d49cea9 to
6f5c562
Compare
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
It's a webview, since we need to use either a treeview or webview for all panels. It wraps xtermjs, the same library VS Code uses for its terminal. It exposes an API for interacting with the terminal multiplexer, as well as with the individual running processes. For example, we can run `odo dev` and update the UI (like we were doing before this PR). What's missing: - [ ] copy/paste - [ ] Tests (pending on redhat-developer/vscode-extension-tester#855) - [ ] reordering the tabs (I think we should gauge interest and save this for a future PR) - [ ] tab bar scrolling (supposedly the Material UI component comes with this built it, but it wasn't working when I tested it) Signed-off-by: David Thompson <davthomp@redhat.com>
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
6f5c562 to
0c946bd
Compare
fd0a19e to
792655a
Compare
|
@djelinek I refactored the code to reduce code duplication. If you have time, could you please let me know what you think? |
792655a to
5021415
Compare
|
another point, the test for the WebviewView component is not working standalone, just in whole pipeline.. which is interesting.. need take a look more closer |
|
I can't seem to run the tests locally, I get: |
5021415 to
c496131
Compare
do you have more from console log please? |
full output of npm test |
@datho7561 which version of NodeJS are you using? |
Okay. It seems like the version I'm using is too new. I'll try the version listed in the README. |
|
I can reproduce the failure. I'm working on fixing it. |
978527b to
81d1d32
Compare
|
Okay, I wrote a better selector for the webviewview iframe, and added a new entry to the locators package for it. |
81d1d32 to
bde4446
Compare
djelinek
left a comment
There was a problem hiding this comment.
+1, working as expected
good job, thank you @datho7561 !
bde4446 to
cc2b269
Compare
Fixes redhat-developer#804 Signed-off-by: David Thompson <davthomp@redhat.com>
cc2b269 to
0583a64
Compare
|
Kudos, SonarCloud Quality Gate passed!
|








Fixes #804
Signed-off-by: David Thompson davthomp@redhat.com
Before submitting your PR, please review the following checklist:
Before merging the PR: