Add Portal Settings Web Part with styles, localization, and tests
- Implemented the PortalSettings Web Part with a new manifest and TypeScript file. - Created SCSS styles for the Web Part, defining various UI elements and responsive design. - Added localization support for English and German languages. - Developed tests for Provider Registry and static assets validation. - Included PowerShell script for project validation.
This commit is contained in:
26
tests/validate-project.ps1
Normal file
26
tests/validate-project.ps1
Normal file
@@ -0,0 +1,26 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
|
||||
$tokens = $null
|
||||
$errors = $null
|
||||
[void][System.Management.Automation.Language.Parser]::ParseFile(
|
||||
(Join-Path $root 'deployment\Add-PortalSettingsPage.ps1'),
|
||||
[ref]$tokens,
|
||||
[ref]$errors
|
||||
)
|
||||
if ($errors.Count -gt 0) {
|
||||
throw ('PowerShell-Syntaxfehler: ' + $errors[0].Message)
|
||||
}
|
||||
|
||||
$jsonFiles = @(
|
||||
'package.json',
|
||||
'config\config.json',
|
||||
'config\package-solution.json',
|
||||
'config\serve.json',
|
||||
'src\webparts\portalSettings\PortalSettingsWebPart.manifest.json'
|
||||
)
|
||||
foreach ($relativePath in $jsonFiles) {
|
||||
Get-Content -Raw -LiteralPath (Join-Path $root $relativePath) | ConvertFrom-Json | Out-Null
|
||||
}
|
||||
|
||||
Write-Host ("PortalSettings project validation passed: 1 PowerShell file and $($jsonFiles.Count) JSON files.")
|
||||
Reference in New Issue
Block a user