-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixes #76 broken selector in TitleBar.getItem() #77
Fixes #76 broken selector in TitleBar.getItem() #77
Conversation
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.
Amazing, thank you 👍
It seems like the locator is not working for VS Code Ubuntu, can you verify? I would recommend to use https://github.com/stateful/vscode-server-action to inspect the pipelines. |
The idea of the page object API is to allow to just use a single interface for all environments. So ideally it would be great if we could be flexible here, e.g. check if the menu bar is collapsed and if so click on it first to get all items. If it is not possible at it should throw an error that the titlebar is not available for that environment. Do you think we can do something like this? |
Sure, that's how I'd like it to behave too. As for the implementation, I think it would be best to determine if we need to expand the overflow first by looking at |
Feel free to add locators as you need, just because they are not in there doesn't mean they don't exist in VS Code. |
So I finally made some progress on this, a few points that came up while working on it: I had to fix (or was this intentional? doesn't seem like it) ContextMenuItem.select to return the nested menu like TitleBarItem.select does. I also had to add same sleeps as are present in the ContextMenu into TitleBar to wait for menu to open. Lastly I'm not sure if it is intentional that ContextMenuItem.isNesting spins for quite a long time if the menu does not actually have submenu, Also, I'm not sure how to handle testing in CI of all the various states the titlebar can be in as this relies on width of the vscode window.
|
VS Code might have changed some selectors which caused this to break and it seems we never had thorough tests for that Page Object.
Happy to review bigger PRs too or additional PRs at a later point. Let's make sure the code we add uses
I am happy to have certain context menu types to be "not supported". I understand that trying to provide solid interfaces for all environments and use case to be impossible to maintain. Therefor let's go with the approach of whatever helps to unblock you in your project we can implement. |
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 this fix. I will go ahead and merge. 👍
Closes #76