-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5987af0
commit fac1cec
Showing
8 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/UniversalDashboard.UITest/Integration/Sessions.Tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
param([Switch]$Release) | ||
|
||
Import-Module "$PSScriptRoot\..\TestFramework.psm1" -Force | ||
$ModulePath = Get-ModulePath -Release:$Release | ||
$BrowserPort = Get-BrowserPort -Release:$Release | ||
|
||
Import-Module $ModulePath -Force | ||
|
||
Get-UDDashboard | Stop-UDDashboard | ||
|
||
$Server = Start-UDDashboard -Port 10001 -Dashboard (New-UDDashboard -Title "Test" -Content {}) | ||
$Driver = Start-SeFirefox | ||
|
||
Enable-UDLogging | ||
Describe "Sessions" { | ||
|
||
Context "Should remove sessions" { | ||
$Dashboard = New-UDDashboard -Title "Test" -Content { | ||
|
||
} -IdleTimeout ([TimeSpan]::FromSeconds(5)) | ||
|
||
$Server.DashboardService.SetDashboard($Dashboard) | ||
Enter-SeUrl -Driver $Driver -Url "http://localhost:$BrowserPort" | ||
|
||
Start-sleep 2 | ||
|
||
It "should timeout session" { | ||
|
||
Stop-SeDriver $Driver | ||
|
||
Start-Sleep 8 | ||
|
||
$Dashboard = Get-UDDashboard | ||
$Dashboard.DashboardService.EndpointService.SessionManager.Sessions.Count | Should be 0 | ||
} | ||
} | ||
} | ||
|
||
Stop-SeDriver $Driver | ||
Stop-UDDashboard -Server $Server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters