Ersters Mockup das in der statischen Seite und in Contao angeschaut werden kann

This commit is contained in:
Robert Wartenberg committed 2026-08-20 13:58:05 +02:00
1 parent 6dcc315d25
commit 6a9d31ca5e
7 files changed
+165 -8

No files matched your search

@@ -0,0 +1,32 @@
$projectRoot = Split-Path -Parent $PSScriptRoot
$deployScriptPath = Join-Path $projectRoot 'scripts\Deploy-Perspektivwerk.ps1'
Describe 'Perspektivwerk deployment' {
It 'provides a deployment script for the static page' {
(Test-Path -LiteralPath $deployScriptPath) | Should Be $true
}
It 'uploads the static page and its nested booking assets with one scp invocation' {
$script = Get-Content -LiteralPath $deployScriptPath -Raw
$script | Should Match 'public[\\/]perspektivwerk'
$script | Should Not Match 'public[\\/]booking'
$script | Should Match 'boogie:/home/boogie/html/perspektivwerk/'
([regex]::Matches($script, '& scp')).Count | Should Be 1
$script | Should Not Match '& rsync'
}
It 'repairs read and traversal permissions with a separate SSH invocation' {
$script = Get-Content -LiteralPath $deployScriptPath -Raw
([regex]::Matches($script, '& ssh')).Count | Should Be 1
$script | Should Match 'chmod -R a\+rX /home/boogie/html/perspektivwerk'
}
It 'prints the complete static-page target directory' {
$script = Get-Content -LiteralPath $deployScriptPath -Raw
$script | Should Match 'Zielverzeichnisse auf dem Server'
$script | Should Match 'boogie:/home/boogie/html/perspektivwerk/'
}
}
@@ -1,5 +1,9 @@
$projectRoot = Split-Path -Parent $PSScriptRoot
$mockupPath = Join-Path $projectRoot 'public\perspektivwerk\index.html'
$bookingScriptPath = Join-Path $projectRoot 'public\perspektivwerk\js\booking.js'
$bookingStylesPath = Join-Path $projectRoot 'public\perspektivwerk\js\booking.css'
$contaoBookingScriptPath = Join-Path $projectRoot 'public\booking\booking.js'
$contaoBookingStylesPath = Join-Path $projectRoot 'public\booking\booking.css'
$htaccessPath = Join-Path $projectRoot 'public\.htaccess'
Describe 'Perspektivwerk static route' {
@@ -10,9 +14,18 @@ Describe 'Perspektivwerk static route' {
It 'embeds the appointment booking component with its public assets' {
$mockup = Get-Content -LiteralPath $mockupPath -Raw
$mockup | Should Match 'href="/booking/booking\.css"'
(Test-Path -LiteralPath $bookingScriptPath) | Should Be $true
(Test-Path -LiteralPath $bookingStylesPath) | Should Be $true
$mockup | Should Match 'href="js/booking\.css"'
$mockup | Should Match 'data-sufw-booking'
$mockup | Should Match 'src="/booking/booking\.js"'
$mockup | Should Match 'src="js/booking\.js"'
}
It 'keeps the Contao and static-preview asset copies identical' {
(Test-Path -LiteralPath $contaoBookingScriptPath) | Should Be $true
(Test-Path -LiteralPath $contaoBookingStylesPath) | Should Be $true
(Get-FileHash -LiteralPath $bookingScriptPath).Hash | Should Be (Get-FileHash -LiteralPath $contaoBookingScriptPath).Hash
(Get-FileHash -LiteralPath $bookingStylesPath).Hash | Should Be (Get-FileHash -LiteralPath $contaoBookingStylesPath).Hash
}
It 'routes /perspektivwerk to the static entry point before the Contao fallback' {