$repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path $policyPath = Join-Path $repositoryRoot 'scripts\Set-SguDomainComputerPolicies.ps1' $packagePath = Join-Path $repositoryRoot 'scripts\New-SguBootstrapPackages.ps1' $initializePath = Join-Path $repositoryRoot 'scripts\Initialize-SguDomainController.ps1' $policy = Get-Content -LiteralPath $policyPath -Raw $package = Get-Content -LiteralPath $packagePath -Raw $initialize = Get-Content -LiteralPath $initializePath -Raw Describe 'Managed Microsoft Edge laboratory policy' { It 'suppresses onboarding, browser sign-in and cloud sync through mandatory machine policy' { $policy | Should Match "edgePolicyKey = 'HKLM\\Software\\Policies\\Microsoft\\Edge'" $policy | Should Match "Name = 'HideFirstRunExperience'; Type = 'DWord'; Value = 1" $policy | Should Match "Name = 'BrowserSignin'; Type = 'DWord'; Value = 0" $policy | Should Match "Name = 'SyncDisabled'; Type = 'DWord'; Value = 1" } It 'ships the policy script and invokes it during server initialization' { $package | Should Match "'Set-SguDomainComputerPolicies.ps1'" $initialize | Should Match 'Join-Path \$scriptsRoot ''Set-SguDomainComputerPolicies.ps1''' } }