winutil/pester/winutil.Tests.ps1

28 lines
522 B
PowerShell
Raw Normal View History

#region Load Variables needed for testing
Test 03 2023 (#726) * Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
2023-05-09 13:14:27 -05:00
./Compile.ps1
$script = Get-Content .\winutil.ps1
Test 03 2023 (#726) * Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
2023-05-09 13:14:27 -05:00
$script[0..($script.count - 21)] | Out-File .\pester.ps1
Bugfixes before December (#465) * Update Branch in script * Pester Updates (#394) * Update Branch in script * Update Branch in script * remove redundant test pipeline * update unit tests * remove tests for features not yet implemented * test * update tests * test pipeline * test pipeline * test pipeline * test pipeline * test pipeline * test pipeline * update tests * update pipeline Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> * Update Branch in script * Move preset buttons to function (#396) * Update Branch in script * update set-presets * Update Branch in script Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Require Admin and attempt relaunch (#395) * Update Branch in script * migrate admin check from runspace.ps1 * changed relaunch to use $BranchToUse Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Choco prep (#429) * Update Branch in script * update application file * Update Branch in script * update helper script and fix RevoUnInstaller Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Feature/simplelogging (#431) * Update Branch in script * added transcript for simple logging * Update Branch in script * Update winutil.ps1 * Update Branch in script * Update runspace.ps1 * Update Branch in script Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> * Update Branch in script * Replaced Dark Theme Enable and Disable buttons with a toggle switch (#445) * Replaced Dark Theme Enable and Disable button with a toggle switch * Changed toggle switch background colour Co-authored-by: Chris Titus <contact@christitus.com> * Replace WMI calls (#450) Co-authored-by: Chris Titus <contact@christitus.com> * Fix Chocolatey installation detection (#452) * Fix error * Actually fix it this time * Add comments * Do it faster Co-authored-by: Chris Titus <contact@christitus.com> * 420/removeadmin (#462) * Update Branch in script * Remove Administrator Check Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Update Branch in script Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Josh Ackland <joshackland@pm.me> Co-authored-by: Carter <60557606+Carterpersall@users.noreply.github.com>
2022-11-29 17:54:18 -06:00
#endregion Load Variables needed for testing
Test 03 2023 (#726) * Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
2023-05-09 13:14:27 -05:00
BeforeAll {
. .\pester.ps1
Bugfixes before December (#465) * Update Branch in script * Pester Updates (#394) * Update Branch in script * Update Branch in script * remove redundant test pipeline * update unit tests * remove tests for features not yet implemented * test * update tests * test pipeline * test pipeline * test pipeline * test pipeline * test pipeline * test pipeline * update tests * update pipeline Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> * Update Branch in script * Move preset buttons to function (#396) * Update Branch in script * update set-presets * Update Branch in script Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Require Admin and attempt relaunch (#395) * Update Branch in script * migrate admin check from runspace.ps1 * changed relaunch to use $BranchToUse Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Choco prep (#429) * Update Branch in script * update application file * Update Branch in script * update helper script and fix RevoUnInstaller Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Feature/simplelogging (#431) * Update Branch in script * added transcript for simple logging * Update Branch in script * Update winutil.ps1 * Update Branch in script * Update runspace.ps1 * Update Branch in script Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> * Update Branch in script * Replaced Dark Theme Enable and Disable buttons with a toggle switch (#445) * Replaced Dark Theme Enable and Disable button with a toggle switch * Changed toggle switch background colour Co-authored-by: Chris Titus <contact@christitus.com> * Replace WMI calls (#450) Co-authored-by: Chris Titus <contact@christitus.com> * Fix Chocolatey installation detection (#452) * Fix error * Actually fix it this time * Add comments * Do it faster Co-authored-by: Chris Titus <contact@christitus.com> * 420/removeadmin (#462) * Update Branch in script * Remove Administrator Check Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update Branch in script * Update Branch in script Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: DeveloperDurp <DeveloperDurp@users.noreply.github.com> Co-authored-by: Josh Ackland <joshackland@pm.me> Co-authored-by: Carter <60557606+Carterpersall@users.noreply.github.com>
2022-11-29 17:54:18 -06:00
}
Describe "GUI" {
Context "XML" {
It "Imports with no errors" {
Test 03 2023 (#726) * Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
2023-05-09 13:14:27 -05:00
$inputXML | should -Not -BeNullOrEmpty
}
}
Context "Form" {
It "Imports with no errors" {
Test 03 2023 (#726) * Update inputXML.xaml * Compile Winutil * Update main.ps1 (#641) Fix DarkMode * Compile Winutil * Compile Winutil * Compile Winutil * Update tweaks.json * fix hovertime * shortcut (#643) add ability to create a shortcut to invoke winutil more easily * Compile Winutil * Tweaks Check (#646) * Tweaks Check Added check for no checked tweaks plus formatting * more formating fixing * Compile Winutil * [ooshutup10] Fixed link to ooshutup10 settings file (#665) * Compile Winutil * Features Migrated to config and runspaces (#667) * Compile Winutil * Document Calendar Disable/Enable Check Disable Notification and click undo tweaks to re-enable calendar * Compile Winutil * Update Edge_Removal.bat * Update Edge_Removal.bat (#660) * garbage commit - read system Trying to read current system registry values state and do a checkbox for enabled or disabled values * Compile Winutil * Add Ubisoft Connect & WinRAR as install options. (#678) * Compile Winutil * adding the code from asheroto to install winget (#684) * adding the code from asheroto to get winget with Server versions of Windows, that come without winget , the script seems unable to install it and then refuses to install any programs. so by adding two lines of code (hopefully) you can include the installation of winget and then fulfill the requirement and let the program run and do all the cool things * instaling winget from asheroto so the script will check if winget is installed on server and LTSC versions of Windows. and tries to install it, when for some reason it can't, then a condition on the code gets fulfilled and the function breaks, this code from the asheroto repo should, (hopefully) make it so winget can get installed and the condition is never met, therefore allowing it the script to continue * Compile Winutil * Add Neovim and Node Version Manager (#691) * Compile Winutil * Preload Winget and tweaks with already installed (#682) * winget * updated runspaces and winget to update gui outside of main thread * registry check for tweaks * add impex to winget * add uninstall button * tweaks done * update tests --------- Co-authored-by: Chris Titus <contact@christitus.com> * Compile Winutil * feat: add postman into developement (#695) Co-authored-by: Chris Titus <contact@christitus.com> * Update inputXML.xaml (#701) Some of the items were missing WPF in the name * Compile Winutil * Split up AllowGameDVR to fix breaking Xbox Game Bar (#692) * Split up AllowGameDVR to fix breaking Xbox Game Bar * Undo changes to winutil * Compile Winutil * Removed Atom due to it having been sunsetted (#711) Co-authored-by: Chris Titus <contact@christitus.com> * Add application GeForce NOW to Applications/Games (#724) * Compile Winutil * Fix syntax and typo * Compile Winutil * Fixing Original Service Types * Compile Winutil * Update inputXML.xaml (#725) Fix typo as upgrade selection will upgrade all * Compile Winutil --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: DeveloperDurp <developerdurp@durp.info> Co-authored-by: jokerwrld999 <47574931+jokerwrld999@users.noreply.github.com> Co-authored-by: Raf <69535896+Rafee-M@users.noreply.github.com> Co-authored-by: Jack Boecker <boeckerjack@protonmail.com> Co-authored-by: migno_chrono <75509204+mignochrono@users.noreply.github.com> Co-authored-by: Umair Raza <52033975+umairraza96@users.noreply.github.com> Co-authored-by: dreamsyntax <dreamsyntax@gmail.com> Co-authored-by: Daniel <74148862+Danulal@users.noreply.github.com> Co-authored-by: tomgrice <tomgrice@gmail.com>
2023-05-09 13:14:27 -05:00
$sync.Form | should -Not -BeNullOrEmpty
}
}
}