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

Use simple textField selection by default; provide more customization options #25

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Aug 19, 2024

Use simple textField selection by default; provide more customization options

♻️ Current situation & Problem

Text entry in UI tests is still not trivial. This package has provided some great utilities for text entry. However, sometimes there needs to be more customization with text entry. Further, the "tap from the far right" for textfield selection is not always ideal or not always needed.
Refer to the release notes for a list of changes.

⚙️ Release Notes

  • The new default for textField selection is now simply tapping the text field. Tapping from the right is now an opt-in option.
  • All customization points are now part of the TextInputOptions that are passed to delete and enter methods.
    • checkIfTextWasEnteredCorrectly was replaced by the skipTextInputValidation option. This option stays enabled by default.
    • dismissKeyboard was replaced by the disableKeyboardDismiss option. Keyboard is no longer dismissed before text field selection. Please do that manually.
  • Show the test title in the navigation bar for TestAppTests.
  • The deprecated disablePasswordAutofill() method was removed.

📚 Documentation

Documentation was updated.

✅ Testing

Tests were slightly updated.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.68%. Comparing base (f543346) to head (7be53f8).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   83.30%   87.68%   +4.39%     
==========================================
  Files          11       10       -1     
  Lines         431      357      -74     
==========================================
- Hits          359      313      -46     
+ Misses         72       44      -28     
Files Coverage Δ
Sources/XCTestApp/TestAppTestsView.swift 82.76% <100.00%> (+3.60%) ⬆️
Sources/XCTestApp/TestAppView.swift 93.34% <ø> (ø)
...urces/XCTestExtensions/XCUIElement+TextEntry.swift 91.80% <100.00%> (-1.01%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f543346...7be53f8. Read the comment docs.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you @Supereg for the improvements; great next step for the package!

@Supereg Supereg merged commit aad6c16 into main Aug 19, 2024
11 checks passed
@Supereg Supereg deleted the feature/improved-text-entry branch August 19, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants