@@ -53,7 +53,7 @@ class RootTests: XCTestCase {
53
53
// Ensure the backup info modal is visible.
54
54
let secondViewModel = root. viewModel ( for: [ ] , at: displayTime)
55
55
switch secondViewModel. modal {
56
- case . info( let infoViewModel) :
56
+ case . info( _ , . some ( let infoViewModel) ) :
57
57
XCTAssert ( infoViewModel. title == " Backups " )
58
58
default :
59
59
XCTFail ( " Expected Backups .info, got \( secondViewModel. modal) " )
@@ -88,8 +88,26 @@ class RootTests: XCTestCase {
88
88
return
89
89
}
90
90
91
+ // Show the info list.
92
+ let showInfoAction : Root . Action = . tokenListAction( . showInfo)
93
+ let showInfoEffect : Root . Effect ?
94
+ do {
95
+ showInfoEffect = try root. update ( showInfoAction)
96
+ } catch {
97
+ XCTFail ( " Unexpected error: \( error) " )
98
+ return
99
+ }
100
+ XCTAssertNil ( showInfoEffect)
101
+
102
+ // Ensure the info list modal is visible.
103
+ let nextViewModel = root. viewModel ( for: [ ] , at: displayTime)
104
+ guard case . info( _, . none) = nextViewModel. modal else {
105
+ XCTFail ( " Expected .info list, got \( nextViewModel. modal) " )
106
+ return
107
+ }
108
+
91
109
// Show the license info.
92
- let showAction : Root . Action = . tokenListAction ( . showLicenseInfo)
110
+ let showAction : Root . Action = . infoListEffect ( . showLicenseInfo)
93
111
let showEffect : Root . Effect ?
94
112
do {
95
113
showEffect = try root. update ( showAction)
@@ -102,7 +120,7 @@ class RootTests: XCTestCase {
102
120
// Ensure the license info modal is visible.
103
121
let secondViewModel = root. viewModel ( for: [ ] , at: displayTime)
104
122
switch secondViewModel. modal {
105
- case . info( let infoViewModel) :
123
+ case . info( _ , . some ( let infoViewModel) ) :
106
124
XCTAssert ( infoViewModel. title == " Acknowledgements " )
107
125
default :
108
126
XCTFail ( " Expected Acknowledgements .info, got \( secondViewModel. modal) " )
0 commit comments