-
Notifications
You must be signed in to change notification settings - Fork 96
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
UI Tester update - Implement locating a nested UI for a custom style ListEditor #1175
Conversation
for _ in range(6): | ||
item.find_by_name("name").perform(command.KeyClick("Backspace")) | ||
item.find_by_name("name").perform(command.KeySequence("David")) |
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.
Eventually we will be able to do this with just one KeySequence using '\b' characters, but there is a known issue with that so this works for now.
This also gives a wx failure on windows:
like issue #1177 |
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. Some minor suggestions.
My suspicions in the above discussion were correct. I added a helper function to set the insertion point the the right not the left end of a textbox on wx. This feels a bit tangential to this PR ( I can make this change in a separate PR if needed) but without it, this PR will introduce a new test failure. After #1184 is merged, with this most recent change, there shouldn't be any new errors with this PR as far as I know. |
…hought/traitsui into ui-tester-updates-listeditor
control : Instance of wxTextEntry | ||
""" | ||
control.SetInsertionPoint(control.GetLastPosition()+1) | ||
return control |
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.
This function combines both query and command, which often makes it more difficult to reuse and to modify. We should avoid this as much as possible. See comments in #1184
If we remove this and the changes in traitsui/testing/tester/wx/implementation/text_editor.py
and the KeyClick
in the test, then this PR can be reviewed and merged independently of #1184. The objective of this PR has nothing to do with the text editor anyway.
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.
One function being overly indented, can be merged after fixing that.
Implements the seventh bullet on issue #1149 (Implement locating a nested UI for a custom style ListEditor. Consequently, one should be able to navigate into nested editors inside a nested UI.)
This PR replaces #1172