mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-11-26 07:26:18 +01:00
Refactor feature label handling to utilize language catalogs (#890)
This commit is contained in:
@@ -37,17 +37,7 @@ BeforeAll {
|
||||
}
|
||||
}
|
||||
|
||||
Describe 'Get-UndoFeatureLabel' {
|
||||
BeforeEach {
|
||||
$script:UndoFeatureLabelLookup = @{ DisableTelemetry = 'Enable telemetry' }
|
||||
$script:FeatureLabelLookup = @{ DisableTelemetry = 'Disable telemetry'; DisableWidgets = 'Disable widgets' }
|
||||
}
|
||||
|
||||
It 'prefers undo labels and falls back to feature labels' {
|
||||
Get-UndoFeatureLabel -FeatureId 'DisableTelemetry' | Should -Be 'Enable telemetry'
|
||||
Get-UndoFeatureLabel -FeatureId 'DisableWidgets' | Should -Be 'Disable widgets'
|
||||
}
|
||||
|
||||
Describe 'Main window helpers' {
|
||||
It 'reads selected app IDs from string or array settings and removes blanks' {
|
||||
$stringSettings = [PSCustomObject]@{ Settings = @([PSCustomObject]@{ Name = 'Apps'; Value = ' One.App, ,Two.App ' }) }
|
||||
$arraySettings = [PSCustomObject]@{ Settings = @([PSCustomObject]@{ Name = 'Apps'; Value = @(' One.App ', '', 'Two.App') }) }
|
||||
|
||||
Reference in New Issue
Block a user