I'm writing tests within my SwiftUI application and am working with XCTest
and XCTestCase
. Within my tests, I'm working with (and without) certain user permissions.
The problem that I am running into, is that once permission is set, I must delete the app or reset the settings of the simulator.
I'd like to automate this process within the tests themselves. I was referencing Is there a way to reset the app between tests in Swift XCTest UI?, but the solutions are written in Swift 4 and Swift 3, whereas I am working with Swift 5.
I've also tried XCUITest Class teardown isnt deleting the app. But works if its instance teardown. What am I doing wrong? and can't seem to get that working either.