I'm adding a view with a tag in viewDidAppear
but I implementing an unit test to verify the view is present in the superview but is returning nil.
Here is my testCase:
func testVerifiedViewWithTagIsLoadIt() {
let sut = ViewController()
_ = sut.view
let view = sut.view.viewWithTag(10)
XCTAssertNotNil(view)
XCTAssertNotNil(sut.view.viewWithTag(10))
}
My question is how can I verify the view with tag is load it from XCTest?
I'll really appreciate your help.