Skip to content
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

Test undo/redo behaviour of text input widgets on macOS. #2151

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

bruno-rino
Copy link
Contributor

Widgets tested are:

  • TextInput
  • MultilineTextInput
  • PasswordInput
  • NumberInput

The cocoa MultilineTextInput widget has been updated to enable undo.

Replaces PR #2037

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

The cocoa MultilineTextInput widget has been updated to enable undo
@bruno-rino
Copy link
Contributor Author

This second try was easier. Previously, the NSEvent.keyEventWithType function was ignoring modifierFlags if the characters parameter was a single character... My solution was to set that parameter to None. You seem to have found a better solution.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good. I've dropped a couple of minor comments inline; once those are cleaned up, this should be good to land! Thanks!

changes/2151.feature.rst Outdated Show resolved Hide resolved
android/tests_backend/widgets/base.py Outdated Show resolved Hide resolved
bruno-rino and others added 2 commits October 11, 2023 12:19
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
@bruno-rino
Copy link
Contributor Author

bruno-rino commented Oct 11, 2023

A question of style: I am adding skip to another method that needs it. Do you prefer the call to be pytest.skip() or just skip()? I can see mostly pytest.skip() in the source, but xfail() is always not namespaced.

@freakboy3742
Copy link
Member

A question of style: I am adding skip to another method that needs it. Do you prefer the call to be pytest.skip() or just skip()? I can see mostly pytest.skip() in the source, but xfail() is always not namespaced.

My personal preference is pytest.skip(); but that's in the category of "strong opinion, weakly held". It has essentially come down to who is writing a module as to which form is used. If there's an existing usage in the file, stick to that form; if there's not, it's dealer's choice :-)

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome - thanks!

@freakboy3742 freakboy3742 merged commit 4b335e3 into beeware:main Oct 12, 2023
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants