mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
* Allow an alert to present another alert When we added support for vanilla SwiftUI modifiers, we lost the ability to present one alert after another because `nil` writes to the alert bindings unconditionally dismissed the feature, even if the feature was freshly presented. This fixes things by suppressing dismissal when the identity of a presented item has changed. Fix #3272. * wip
30 lines
700 B
Swift
30 lines
700 B
Swift
import TestCases
|
|
import XCTest
|
|
|
|
final class IfLetStoreTests: BaseIntegrationTests {
|
|
@MainActor
|
|
override func setUpWithError() throws {
|
|
try super.setUpWithError()
|
|
self.app.buttons["Legacy"].tap()
|
|
self.app.buttons[TestCase.Legacy.ifLetStore.rawValue].tap()
|
|
}
|
|
|
|
@MainActor
|
|
func testBasics() async throws {
|
|
XCTAssertEqual(
|
|
self.app.buttons["Show"].waitForExistence(timeout: 1),
|
|
true
|
|
)
|
|
self.app.buttons["Show"].tap()
|
|
XCTAssertEqual(
|
|
self.app.buttons["Dismiss"].waitForExistence(timeout: 1),
|
|
true
|
|
)
|
|
self.app.buttons["Dismiss"].tap()
|
|
XCTAssertEqual(
|
|
self.app.buttons["Show"].waitForExistence(timeout: 1),
|
|
true
|
|
)
|
|
}
|
|
}
|