✨ Story 2.3: page accueil hero
This commit is contained in:
22
tests/home.test.ps1
Normal file
22
tests/home.test.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
function Assert-True {
|
||||
param(
|
||||
[bool]$Condition,
|
||||
[string]$Message
|
||||
)
|
||||
if (-not $Condition) { throw $Message }
|
||||
}
|
||||
|
||||
Assert-True (Test-Path 'pages/home.php') 'Missing pages/home.php'
|
||||
$homeContent = Get-Content -Raw 'pages/home.php'
|
||||
Assert-True ($homeContent -match 'Découvrir mes projets') 'Home missing CTA projects'
|
||||
Assert-True ($homeContent -match 'En savoir plus') 'Home missing CTA about'
|
||||
Assert-True ($homeContent -match 'animate-fade-in') 'Home missing animations'
|
||||
Assert-True ($homeContent -match 'include_template\(\x27navbar\x27') 'Home missing navbar include'
|
||||
|
||||
Assert-True (Test-Path 'index.php') 'Missing index.php'
|
||||
$index = Get-Content -Raw 'index.php'
|
||||
Assert-True ($index -match 'pages/home.php') 'index.php missing home include'
|
||||
|
||||
'OK'
|
||||
Reference in New Issue
Block a user