From 36e59877ff5ac66a6f07ca7f9de2687d20998b94 Mon Sep 17 00:00:00 2001 From: Josef Nemec Date: Fri, 21 Apr 2017 09:26:23 +0200 Subject: [PATCH 1/3] Renamed build output files. --- .gitignore | 4 ++-- build/build.ps1 | 2 +- build/setup.nsi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8ea2767e7..fad411266 100644 --- a/.gitignore +++ b/.gitignore @@ -261,8 +261,8 @@ paket-files/ .vscode/ build/nuget.exe -build/playnite.exe -build/playnite.zip +build/PlayniteInstaller.exe +build/PlaynitePortable.zip build/TestPackage/* build/PlayniteServices/* diff --git a/build/build.ps1 b/build/build.ps1 index 47477830b..fb3f19ad6 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -99,7 +99,7 @@ if ($Portable -and $appCompileSuccess) { Write-Host "Building portable package..." -ForegroundColor Green - $packageName = "playnite.zip" + $packageName = "PlaynitePortable.zip" if (Test-path $packageName) { diff --git a/build/setup.nsi b/build/setup.nsi index c394ac1df..c2d4b2a3e 100644 --- a/build/setup.nsi +++ b/build/setup.nsi @@ -6,7 +6,7 @@ Var /GLOBAL ProgressOnly Var /GLOBAL Portable -OutFile "playnite.exe" +OutFile "PlayniteInstaller.exe" Unicode true SetCompressor /SOLID lzma From 4284b92b07cba9560c4a87fe2603823bc7a52122 Mon Sep 17 00:00:00 2001 From: Josef Nemec Date: Thu, 27 Apr 2017 16:11:10 +0200 Subject: [PATCH 2/3] Some progress in making new tests and UI testability improvements. --- source/Playnite/Database/GameDatabase.cs | 4 + .../PlayniteUI/Controls/FilterSelector.xaml | 12 +- .../Controls/FilterSelectorItem.xaml | 11 +- .../Controls/FilterSelectorItem.xaml.cs | 87 ++++++- source/PlayniteUI/Controls/GameDetails.xaml | 12 +- source/PlayniteUI/Controls/GamePopupMenu.xaml | 94 ++++--- .../PlayniteUI/Controls/GamePopupMenu.xaml.cs | 18 +- .../Controls/GamePopupMenuMulti.xaml | 27 +- .../Controls/GamePopupMenuMulti.xaml.cs | 10 +- source/PlayniteUI/Controls/GameTaskView.xaml | 10 +- .../PlayniteUI/Controls/GamesImagesView.xaml | 35 +-- source/PlayniteUI/Controls/GamesListView.xaml | 6 +- .../PlayniteUI/Controls/ProgressControl.xaml | 2 +- .../Controls/ProgressControl.xaml.cs | 4 +- source/PlayniteUI/Controls/SearchBox.xaml | 4 +- .../Converters/LiteDBImageToImageConverter.cs | 11 +- source/PlayniteUI/Images/close.png | Bin 0 -> 334 bytes source/PlayniteUI/PlayniteUI.csproj | 5 + source/PlayniteUI/Theme.xaml | 246 ++---------------- source/PlayniteUI/Windows/AboutWindow.xaml | 18 +- .../Windows/CategoryConfigWindow.xaml | 3 +- .../Windows/CrashHandlerWindow.xaml | 6 +- .../Windows/FirstTimeStartupWindow.xaml | 48 ++-- source/PlayniteUI/Windows/GameEditWindow.xaml | 68 ++--- .../PlayniteUI/Windows/GameEditWindow.xaml.cs | 36 +-- .../Windows/InstalledGamesWindow.xaml | 8 +- source/PlayniteUI/Windows/MainWindow.xaml | 146 +++++------ source/PlayniteUI/Windows/MainWindow.xaml.cs | 94 ++++--- .../Windows/MetadataLookupWindow.xaml | 7 +- .../Windows/NotificationsWindow.xaml | 3 +- source/PlayniteUI/Windows/SettingsWindow.xaml | 27 +- .../PlayniteUI/Windows/SettingsWindow.xaml.cs | 8 +- tests/Mapping/AboutWindow.ps1 | 21 ++ tests/Mapping/CategoryConfigWindow.ps1 | 21 ++ tests/Mapping/CrashHandlerWindow.ps1 | 17 ++ tests/Mapping/FirstTimeWizardWindow.ps1 | 51 ++++ tests/Mapping/GameEditWindow.ps1 | 119 +++++++++ tests/Mapping/InstalledGamesWindow.ps1 | 21 ++ tests/Mapping/MainWindow.ps1 | 65 +++++ tests/Mapping/MetadataLookupWindow.ps1 | 23 ++ tests/Mapping/NotificationsWindow.ps1 | 13 + tests/Mapping/OpenFileWindow.ps1 | 17 ++ tests/Mapping/SettingsWindow.ps1 | 47 ++++ tests/Mapping/SetupUninstallWindow.ps1 | 20 ++ tests/Mapping/SetupWindow.ps1 | 23 ++ tests/RunTests.ps1 | 4 +- tests/TestFiles/TestCover.jpg | Bin 0 -> 38337 bytes tests/TestFiles/TestIcon.png | Bin 0 -> 32097 bytes tests/UI/FirstTimeWizard.Tests.ps1 | 73 ++++++ tests/UI/GameEditWindow.Tests.ps1 | 192 ++++++++++++++ 50 files changed, 1193 insertions(+), 604 deletions(-) create mode 100644 source/PlayniteUI/Images/close.png create mode 100644 tests/Mapping/AboutWindow.ps1 create mode 100644 tests/Mapping/CategoryConfigWindow.ps1 create mode 100644 tests/Mapping/CrashHandlerWindow.ps1 create mode 100644 tests/Mapping/FirstTimeWizardWindow.ps1 create mode 100644 tests/Mapping/GameEditWindow.ps1 create mode 100644 tests/Mapping/InstalledGamesWindow.ps1 create mode 100644 tests/Mapping/MainWindow.ps1 create mode 100644 tests/Mapping/MetadataLookupWindow.ps1 create mode 100644 tests/Mapping/NotificationsWindow.ps1 create mode 100644 tests/Mapping/OpenFileWindow.ps1 create mode 100644 tests/Mapping/SettingsWindow.ps1 create mode 100644 tests/Mapping/SetupUninstallWindow.ps1 create mode 100644 tests/Mapping/SetupWindow.ps1 create mode 100644 tests/TestFiles/TestCover.jpg create mode 100644 tests/TestFiles/TestIcon.png create mode 100644 tests/UI/FirstTimeWizard.Tests.ps1 create mode 100644 tests/UI/GameEditWindow.Tests.ps1 diff --git a/source/Playnite/Database/GameDatabase.cs b/source/Playnite/Database/GameDatabase.cs index a060fa68d..2ba57735c 100644 --- a/source/Playnite/Database/GameDatabase.cs +++ b/source/Playnite/Database/GameDatabase.cs @@ -262,6 +262,10 @@ public MemoryStream GetFileStream(string id) CheckDbState(); var file = Database.FileStorage.FindById(id); + if (file == null) + { + return null; + } lock (fileLock) { diff --git a/source/PlayniteUI/Controls/FilterSelector.xaml b/source/PlayniteUI/Controls/FilterSelector.xaml index a91e60ac3..b5caf9b62 100644 --- a/source/PlayniteUI/Controls/FilterSelector.xaml +++ b/source/PlayniteUI/Controls/FilterSelector.xaml @@ -9,23 +9,23 @@ mc:Ignorable="d"> - - - - - - diff --git a/source/PlayniteUI/Controls/FilterSelectorItem.xaml b/source/PlayniteUI/Controls/FilterSelectorItem.xaml index dc5cfb7cf..b2d1f1e94 100644 --- a/source/PlayniteUI/Controls/FilterSelectorItem.xaml +++ b/source/PlayniteUI/Controls/FilterSelectorItem.xaml @@ -5,18 +5,17 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:PlayniteUI.Controls" mc:Ignorable="d" - d:DesignWidth="300" - Name="MainControl"> + d:DesignWidth="300"> - + - + - - - - - - - - - - - - - + - - - @@ -3623,6 +3406,11 @@ + + diff --git a/source/PlayniteUI/Windows/AboutWindow.xaml b/source/PlayniteUI/Windows/AboutWindow.xaml index 056eeace8..9709fdc82 100644 --- a/source/PlayniteUI/Windows/AboutWindow.xaml +++ b/source/PlayniteUI/Windows/AboutWindow.xaml @@ -5,24 +5,26 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:PlayniteUI" mc:Ignorable="d" - Name="MainWindow" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" - Title="About Playnite" ResizeMode="NoResize" Height="315" Width="400"> + WindowStartupLocation="CenterOwner" ShowInTaskbar="False" + Title="About Playnite" ResizeMode="NoResize" Height="315" Width="400" + AutomationProperties.AutomationId="WindowAbout"> - + - Homepage at www.playnite.link - Source Code at GitHub @@ -31,12 +33,12 @@ -