-
-
Notifications
You must be signed in to change notification settings - Fork 764
feat: Swap check for Widget and WebElement - Allows Widget extensions to im… #2277
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
base: master
Are you sure you want to change the base?
Conversation
…plement WebElement interface
@@ -193,8 +193,8 @@ protected boolean isDecoratableList(Field field) { | |||
* @return a field value or null. | |||
*/ | |||
public Object decorate(ClassLoader ignored, Field field) { |
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.
would it be also possible to add a test which verifies this behavior?
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.
I can do so yes
…ertion in test case to verify Widgets are instances of WebElement
… as widgets with AppiumFieldDecorator
…feature/webelement-widget
There are some slight changes to test but also the DefaultStubElement now implements the WebElement interface; Prior to the changes contained within, this should've caused all Widgets to then register as only WebElements and NOT widgets; so if widget tests still work this is a good sign that they still function as Widgets. Ive also added some specific assertions to verify that the Widgets are instances of the WebElement interface, indicating that the widgets can be passed as WebElements without need a call to .getWrappedElement(). Finally, there is a change to the Browser test which just uses regular WebElements and the AppiumFieldDecorator to verify that simple elements will not be mistakenly set to be Widgets. |
Had to make some quick updates for a silly oversight as well as a thing about using * in imports |
@valfirst @mykola-mokhnach Is there some kind of documentation on a specific ordering for imports? Builds keep failing due to import order and I don't want to keep playing the build and wait for failure to keep making changes to that. |
@iFatRain here are rules: java-client/config/checkstyle/appium-style.xml Lines 35 to 41 in 12a0f00
(and alphabetical order inside groups) |
Interesting that only the flutter-ios tests are now seeming to fail; I didn't touch anything that im aware of which could impact those tests, since the changes were PageFactory related only? |
@iFatRain These are flaky tests, is your PR ready? can it be moved out o draft? |
@valfirst I can move it out of draft if the changes to test cases are sufficient for what was asked. I modified the DefaultStubWidget within the Widget tests to implement WebElement to show that it didn't adversely impact the creation and test cases for Widgets, while additional showcasing that they can be leveraged as element themselves, adding a check in one of the tests to show that the widget is an instance of WebElement; |
Change list
Types of changes
Changes Widget init. to enable a little more flexibility in use cases.
Details