mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 01:51:18 +10:00
Clean up analyzer warnings across app search and ISO workflows (#4794)
* Clean up analyzer warnings * Align analyzer warning cleanup policy * Run PSScriptAnalyzer directly in unittests workflow * Bind lazy-rendered buttons to click handlers * Remove WinUtil performance tracing * Fix Win11 ISO creator temp directory reuse
This commit is contained in:
@@ -11,9 +11,6 @@ BeforeAll {
|
||||
function Initialize-WPFUI {
|
||||
param([string]$TargetGridName)
|
||||
}
|
||||
function Write-WinUtilPerformanceCheckpoint {
|
||||
param([string]$Name)
|
||||
}
|
||||
function Invoke-WinUtilISOCheckExistingWork { }
|
||||
|
||||
. (Join-Path $script:repoRoot "functions\private\Initialize-WinUtilTabContent.ps1")
|
||||
@@ -32,7 +29,6 @@ Describe "Initialize-WinUtilTabContent" {
|
||||
|
||||
Mock Invoke-WPFUIElements { }
|
||||
Mock Initialize-WPFUI { }
|
||||
Mock Write-WinUtilPerformanceCheckpoint { }
|
||||
}
|
||||
|
||||
AfterEach {
|
||||
@@ -91,4 +87,13 @@ Describe "Startup lazy tab wiring" {
|
||||
|
||||
$tabScript | Should -Match 'Initialize-WinUtilTabContent -TabName \$sync\.currentTab'
|
||||
}
|
||||
|
||||
It "binds generated button clicks when lazy panels are rendered" {
|
||||
$rendererScript = Get-Content -Path (Join-Path $script:repoRoot "functions\public\Invoke-WPFUIElements.ps1") -Raw
|
||||
$mainScript = Get-Content -Path (Join-Path $script:repoRoot "scripts\main.ps1") -Raw
|
||||
|
||||
$rendererScript | Should -Match '(?s)"Button"\s*\{.*\$button\.Add_Click\(\{.*Invoke-WPFButton \$Sender\.name'
|
||||
$rendererScript | Should -Match '\$sync\.Buttons\.Add\(\$button\.Name\)'
|
||||
$mainScript | Should -Match '\$sync\.Buttons -notcontains \$psitem'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user