Open GHMarcus opened 8 months ago
Hi @GHMarcus, I'm facing the same issue. Did you find a work around for this?
@mat1th
Kind of, we ended up checking of we are running inside the Unit-Tests and setting clearButtonMode
to .never
for this cases.
For some search bars inside of our app it looks like this
if NSClassFromString("XCTest") != nil {
searchBar.searchTextField.clearButtonMode = .never
}
Hope this will help you.
Hi @GHMarcus, thank you. Will try out if this also is a solution for me.
Describe the bug
Snapshotting a filled
UITextField
with an iOS 17 Simulator didn't record theClearButton
at the end of the text field anymore.To Reproduce
Methode:
clearButtonMode
from the text field to.always
.Methode:
iPhone 14
and when you use an iOS 16 iPhone 14 and run all test both will succeed. When you run the tests with an iOS 17 iPhone 14 the second one (FilledAppearance) will fail.Expected behavior
Environment
Additional context
Some strange behaviour I ran into when debugging this bug:
TextInputBugTests.swift
file).