Bake La Salle branding into welcome wallpaper
This commit is contained in:
@@ -89,7 +89,29 @@ Describe 'Welcome wallpaper with AD metadata' {
|
||||
$result = Invoke-WelcomeFixture -DirectoryGender $null `
|
||||
-DirectoryLocation 'Aula Flexible' `
|
||||
-DirectoryOu 'Centro de Experiencia Digital'
|
||||
$result.LocationText | Should Be 'Acceso al Aula Flexible del Centro de Experiencia Digital.'
|
||||
$result.LocationText | Should Be "Acceso al Aula Flexible`ndel Centro de Experiencia Digital."
|
||||
$result.LocationPrimaryText | Should Be 'Acceso al Aula Flexible'
|
||||
$result.LocationSecondaryText | Should Be 'del Centro de Experiencia Digital.'
|
||||
}
|
||||
|
||||
It 'uses the requested neutral, masculine and feminine location wording' {
|
||||
$neutral = Invoke-WelcomeFixture -DirectoryGender $null `
|
||||
-DirectoryLocation 'Sala de Aplicaciones' `
|
||||
-DirectoryOu 'Laboratorio de Cómputo de Ingeniería'
|
||||
$neutral.LocationPrimaryText | Should Be 'Acceso a la Sala de Aplicaciones'
|
||||
$neutral.LocationSecondaryText | Should Be 'del Laboratorio de Cómputo de Ingeniería.'
|
||||
|
||||
$male = Invoke-WelcomeFixture -DirectoryGender 'Male' `
|
||||
-DirectoryLocation 'Aula Flexible' `
|
||||
-DirectoryOu 'Centro de Experiencia Digital'
|
||||
$male.LocationPrimaryText | Should Be 'Estás ubicado en el Aula Flexible'
|
||||
$male.LocationSecondaryText | Should Be 'del Centro de Experiencia Digital.'
|
||||
|
||||
$female = Invoke-WelcomeFixture -DirectoryGender 'Female' `
|
||||
-DirectoryLocation 'Sala de Redes' `
|
||||
-DirectoryOu 'Laboratorio de Cómputo de Ingeniería'
|
||||
$female.LocationPrimaryText | Should Be 'Estás ubicada en la Sala de Redes'
|
||||
$female.LocationSecondaryText | Should Be 'del Laboratorio de Cómputo de Ingeniería.'
|
||||
}
|
||||
|
||||
It 'keeps machine location metadata when the GPO command has no location arguments' {
|
||||
@@ -98,6 +120,26 @@ Describe 'Welcome wallpaper with AD metadata' {
|
||||
-DirectoryOu 'Laboratorio' `
|
||||
-MachineLocation 'Aula Flexible' `
|
||||
-MachineOu 'Centro de Experiencia Digital'
|
||||
$result.LocationText | Should Be 'Acceso al Aula Flexible del Centro de Experiencia Digital.'
|
||||
$result.LocationText | Should Be "Acceso al Aula Flexible`ndel Centro de Experiencia Digital."
|
||||
}
|
||||
|
||||
It 'ships the logo inside the base image instead of compositing it at runtime' {
|
||||
$source | Should Not Match 'lasalle-logo-blanco|DrawImage.*logo|composite.*logo'
|
||||
$bitmap = [Drawing.Bitmap]::FromFile((Join-Path $repositoryRoot 'assets\branding\darkblue.jpg'))
|
||||
try {
|
||||
$whitePixels = 0
|
||||
for ($x = 60; $x -lt 390; $x += 2) {
|
||||
for ($y = 45; $y -lt 175; $y += 2) {
|
||||
$pixel = $bitmap.GetPixel($x, $y)
|
||||
if ($pixel.R -gt 220 -and $pixel.G -gt 220 -and $pixel.B -gt 220) {
|
||||
$whitePixels++
|
||||
}
|
||||
}
|
||||
}
|
||||
($whitePixels -gt 250) | Should Be $true
|
||||
}
|
||||
finally {
|
||||
$bitmap.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user