Got a situation where our UI tests are failing because according to print(app.debugDescription) the XCUITests still "see" an SFSafariViewController even though it's been dismissed (and appears to be dismissed on the device.)
To illustrate:
print(app.debugDescription)
let result = app.navigationBars.staticTexts["My Title"].firstMatch.waitForExistence(timeout: 30)
print("Did I find it?")
print(result)
print("Maybe, see above")
In the above code, the first app.debugDescription prints an accessibility tree describing the SFSafariViewController. The print(result) statement prints "false" and breakpointing on the line after that and running po app.debugDescription shows me the same tree. Though it's obvious from the device display that the SFSafariViewController has been dismissed.
Anyone else seeing this problem? I'd like to know if it's a Known Bug before I go to the effort of swapping out SFSafariViewController for SFAuthenticationSession.