@@ -24,7 +24,6 @@ public async Task PairingRequestCreatesPendingApprovalWithoutImmediateResponse()
2424 remoteAddress : "192.168.1.50" ) ;
2525
2626 Assert . Empty ( result . OutgoingMessages ) ;
27- Assert . False ( result . ShouldAutoHideMainWindow ) ;
2827 Assert . Null ( result . AuthenticatedConnectionId ) ;
2928 Assert . Null ( result . AuthenticatedDeviceId ) ;
3029 Assert . Null ( result . AuthFailureReason ) ;
@@ -142,7 +141,6 @@ public async Task DelegatesAuthenticatedCommandsToCommandSession()
142141 "ble-1" ,
143142 SignedCommand ( "keyboard.key" , new { key = "Meta" } ) ) ;
144143
145- Assert . False ( result . ShouldAutoHideMainWindow ) ;
146144 Assert . Equal ( "ble-1" , result . AuthenticatedConnectionId ) ;
147145 Assert . Equal ( DeviceId , result . AuthenticatedDeviceId ) ;
148146 Assert . Null ( result . AuthFailureReason ) ;
@@ -171,63 +169,18 @@ public async Task UnknownAuthenticatedCommandReportsAuthFailureWithoutMarkingCon
171169 }
172170
173171 [ Fact ]
174- public async Task PreviouslyUsedDeviceCommandRequestsAutoHide ( )
175- {
176- TestContext context = CreateContext ( lastSeenAt : Now - 500 ) ;
177-
178- RemoteSessionResult result = await context . Session . ProcessMessageAsync (
179- "ble-1" ,
180- SignedCommand ( "keyboard.key" , new { key = "Meta" } ) ) ;
181-
182- Assert . True ( result . ShouldAutoHideMainWindow ) ;
183- }
184-
185- [ Fact ]
186- public async Task NewlyPairedDeviceConnectionDoesNotAutoHideDuringFirstSession ( )
172+ public async Task AuthenticatedCommandsUpdateLastSeenAt ( )
187173 {
188174 TestContext context = CreateContext ( ) ;
189175
190- RemoteSessionResult first = await context . Session . ProcessMessageAsync (
176+ await context . Session . ProcessMessageAsync (
191177 "ble-1" ,
192178 SignedCommand ( "keyboard.key" , new { key = "Meta" } , id : "command-1" ) ) ;
193- RemoteSessionResult second = await context . Session . ProcessMessageAsync (
194- "ble-1" ,
195- SignedCommand ( "connection.ping" , new { } , id : "command-2" ) ) ;
196-
197- Assert . False ( first . ShouldAutoHideMainWindow ) ;
198- Assert . False ( second . ShouldAutoHideMainWindow ) ;
199- Assert . Equal ( Now , ( await context . Store . LoadAsync ( ) ) . PairedDevices [ 0 ] . LastSeenAt ) ;
200- }
201-
202- [ Fact ]
203- public async Task PreviouslyUsedDeviceReconnectCanAutoHide ( )
204- {
205- TestContext context = CreateContext ( ) ;
206179 await context . Session . ProcessMessageAsync (
207180 "ble-1" ,
208- SignedCommand ( "keyboard.key" , new { key = "Meta" } , id : "command-1" ) ) ;
209- context . Session . RemoveConnection ( "ble-1" ) ;
210-
211- RemoteSessionResult result = await context . Session . ProcessMessageAsync (
212- "ble-2" ,
213181 SignedCommand ( "connection.ping" , new { } , id : "command-2" ) ) ;
214182
215- Assert . True ( result . ShouldAutoHideMainWindow ) ;
216- }
217-
218- [ Fact ]
219- public async Task RemoveConnectionClearsAutoHideEligibility ( )
220- {
221- TestContext context = CreateContext ( lastSeenAt : Now - 500 ) ;
222- Assert . True ( ( await context . Session . ProcessMessageAsync (
223- "ble-1" ,
224- SignedCommand ( "keyboard.key" , new { key = "Meta" } , id : "command-1" ) ) ) . ShouldAutoHideMainWindow ) ;
225-
226- context . Session . RemoveConnection ( "ble-1" ) ;
227-
228- Assert . True ( ( await context . Session . ProcessMessageAsync (
229- "ble-1" ,
230- SignedCommand ( "connection.ping" , new { } , id : "command-2" ) ) ) . ShouldAutoHideMainWindow ) ;
183+ Assert . Equal ( Now , ( await context . Store . LoadAsync ( ) ) . PairedDevices [ 0 ] . LastSeenAt ) ;
231184 }
232185
233186 [ Fact ]
0 commit comments