Given this snapshot test:
@available(iOS 14.0, *)
func testTextEditor() {
let textEditor = TextEditor(text: .constant(""))
.frame(
width: UIScreen.main.bounds.width,
height: UIScreen.main.bounds.height
)
.border(Color.black)
assertSnapshot(
matching: textEditor,
as: .accessibilityImage,
named: nameForDevice()
)
}
The library renders this snapshot where the accessibility bounding box does not match the text editor's frame (note that the missing description for the Text Field is being worked in #186):

This misrendering does not occur if the text editor is wrapped in a UIHostingController before calling assertSnapshot.
Given this snapshot test:
The library renders this snapshot where the accessibility bounding box does not match the text editor's frame (note that the missing description for the Text Field is being worked in #186):

This misrendering does not occur if the text editor is wrapped in a
UIHostingControllerbefore callingassertSnapshot.