diff options
| author | Rob Mensching <rob@firegiant.com> | 2022-02-03 10:24:16 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2022-02-03 11:21:49 -0800 |
| commit | 86eff4ef9fe32b4cf424b1a0abec1599d4367f60 (patch) | |
| tree | fe77e2eea169573c6c5f833a6db5be2ceb90df30 /src | |
| parent | 7d15b1bc97cdd9933ca43a6b16b84a81b22c3457 (diff) | |
| download | wix-86eff4ef9fe32b4cf424b1a0abec1599d4367f60.tar.gz wix-86eff4ef9fe32b4cf424b1a0abec1599d4367f60.tar.bz2 wix-86eff4ef9fe32b4cf424b1a0abec1599d4367f60.zip | |
Centralize UI tests to UIFixture
Diffstat (limited to 'src')
| -rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 52 | ||||
| -rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/TestData/UI/DialogsInInstallUISequence.wxs (renamed from src/wix/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs) | 0 | ||||
| -rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/UIFixture.cs | 69 |
3 files changed, 69 insertions, 52 deletions
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 39231cd2..259c480c 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -290,58 +290,6 @@ namespace WixToolsetTest.CoreIntegration | |||
| 290 | }, results); | 290 | }, results); |
| 291 | } | 291 | } |
| 292 | } | 292 | } |
| 293 | |||
| 294 | [Fact] | ||
| 295 | public void PopulatesControlTables() | ||
| 296 | { | ||
| 297 | var folder = TestData.Get(@"TestData"); | ||
| 298 | |||
| 299 | using (var fs = new DisposableFileSystem()) | ||
| 300 | { | ||
| 301 | var baseFolder = fs.GetFolder(); | ||
| 302 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 303 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 304 | |||
| 305 | var result = WixRunner.Execute(new[] | ||
| 306 | { | ||
| 307 | "build", | ||
| 308 | Path.Combine(folder, "DialogsInInstallUISequence", "PackageComponents.wxs"), | ||
| 309 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 310 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 311 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 312 | "-intermediateFolder", intermediateFolder, | ||
| 313 | "-o", msiPath, | ||
| 314 | }); | ||
| 315 | |||
| 316 | result.AssertSuccess(); | ||
| 317 | |||
| 318 | Assert.True(File.Exists(msiPath)); | ||
| 319 | |||
| 320 | var results = Query.QueryDatabase(msiPath, new[] { "CheckBox", "Control", "ControlCondition", "InstallUISequence" }); | ||
| 321 | WixAssert.CompareLineByLine(new[] | ||
| 322 | { | ||
| 323 | "CheckBox:WIXUI_EXITDIALOGOPTIONALCHECKBOX\t1", | ||
| 324 | "Control:FirstDialog\tHeader\tText\t0\t13\t90\t13\t3\t\tFirstDialogHeader\tTitle\t", | ||
| 325 | "Control:FirstDialog\tTitle\tText\t0\t0\t90\t13\t3\t\tFirstDialogTitle\tHeader\t", | ||
| 326 | "Control:SecondDialog\tOptionalCheckBox\tCheckBox\t0\t13\t100\t40\t2\tWIXUI_EXITDIALOGOPTIONALCHECKBOX\t[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]\tTitle\tOptional checkbox|Check this box for fun", | ||
| 327 | "Control:SecondDialog\tTitle\tText\t0\t0\t90\t13\t3\t\tSecondDialogTitle\tOptionalCheckBox\t", | ||
| 328 | "ControlCondition:FirstDialog\tHeader\tDisable\tInstalled", | ||
| 329 | "ControlCondition:FirstDialog\tHeader\tHide\tInstalled", | ||
| 330 | "ControlCondition:SecondDialog\tOptionalCheckBox\tShow\tWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed", | ||
| 331 | "InstallUISequence:CostFinalize\t\t1000", | ||
| 332 | "InstallUISequence:CostInitialize\t\t800", | ||
| 333 | "InstallUISequence:ExecuteAction\t\t1300", | ||
| 334 | "InstallUISequence:FileCost\t\t900", | ||
| 335 | "InstallUISequence:FindRelatedProducts\t\t25", | ||
| 336 | "InstallUISequence:FirstDialog\tInstalled AND PATCH\t1298", | ||
| 337 | "InstallUISequence:LaunchConditions\t\t100", | ||
| 338 | "InstallUISequence:MigrateFeatureStates\t\t1200", | ||
| 339 | "InstallUISequence:SecondDialog\tNOT Installed\t1299", | ||
| 340 | "InstallUISequence:ValidateProductID\t\t700", | ||
| 341 | }, results); | ||
| 342 | } | ||
| 343 | } | ||
| 344 | |||
| 345 | [Fact] | 293 | [Fact] |
| 346 | public void PopulatesCreateFolderTableForNullKeypathComponents() | 294 | public void PopulatesCreateFolderTableForNullKeypathComponents() |
| 347 | { | 295 | { |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/UI/DialogsInInstallUISequence.wxs index ec6e62df..ec6e62df 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/UI/DialogsInInstallUISequence.wxs | |||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UIFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UIFixture.cs new file mode 100644 index 00000000..8218ed67 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UIFixture.cs | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.CoreIntegration | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.IO; | ||
| 7 | using System.Linq; | ||
| 8 | using Example.Extension; | ||
| 9 | using WixBuildTools.TestSupport; | ||
| 10 | using WixToolset.Core.TestPackage; | ||
| 11 | using WixToolset.Data; | ||
| 12 | using WixToolset.Data.Symbols; | ||
| 13 | using WixToolset.Data.WindowsInstaller; | ||
| 14 | using Xunit; | ||
| 15 | |||
| 16 | public class UIFixture | ||
| 17 | { | ||
| 18 | [Fact] | ||
| 19 | public void PopulatesControlTables() | ||
| 20 | { | ||
| 21 | var folder = TestData.Get(@"TestData"); | ||
| 22 | |||
| 23 | using (var fs = new DisposableFileSystem()) | ||
| 24 | { | ||
| 25 | var baseFolder = fs.GetFolder(); | ||
| 26 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 27 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 28 | |||
| 29 | var result = WixRunner.Execute(new[] | ||
| 30 | { | ||
| 31 | "build", | ||
| 32 | Path.Combine(folder, "UI", "DialogsInInstallUISequence.wxs"), | ||
| 33 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 34 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 35 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 36 | "-intermediateFolder", intermediateFolder, | ||
| 37 | "-o", msiPath, | ||
| 38 | }); | ||
| 39 | |||
| 40 | result.AssertSuccess(); | ||
| 41 | |||
| 42 | Assert.True(File.Exists(msiPath)); | ||
| 43 | |||
| 44 | var results = Query.QueryDatabase(msiPath, new[] { "CheckBox", "Control", "ControlCondition", "InstallUISequence" }); | ||
| 45 | WixAssert.CompareLineByLine(new[] | ||
| 46 | { | ||
| 47 | "CheckBox:WIXUI_EXITDIALOGOPTIONALCHECKBOX\t1", | ||
| 48 | "Control:FirstDialog\tHeader\tText\t0\t13\t90\t13\t3\t\tFirstDialogHeader\tTitle\t", | ||
| 49 | "Control:FirstDialog\tTitle\tText\t0\t0\t90\t13\t3\t\tFirstDialogTitle\tHeader\t", | ||
| 50 | "Control:SecondDialog\tOptionalCheckBox\tCheckBox\t0\t13\t100\t40\t2\tWIXUI_EXITDIALOGOPTIONALCHECKBOX\t[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]\tTitle\tOptional checkbox|Check this box for fun", | ||
| 51 | "Control:SecondDialog\tTitle\tText\t0\t0\t90\t13\t3\t\tSecondDialogTitle\tOptionalCheckBox\t", | ||
| 52 | "ControlCondition:FirstDialog\tHeader\tDisable\tInstalled", | ||
| 53 | "ControlCondition:FirstDialog\tHeader\tHide\tInstalled", | ||
| 54 | "ControlCondition:SecondDialog\tOptionalCheckBox\tShow\tWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed", | ||
| 55 | "InstallUISequence:CostFinalize\t\t1000", | ||
| 56 | "InstallUISequence:CostInitialize\t\t800", | ||
| 57 | "InstallUISequence:ExecuteAction\t\t1300", | ||
| 58 | "InstallUISequence:FileCost\t\t900", | ||
| 59 | "InstallUISequence:FindRelatedProducts\t\t25", | ||
| 60 | "InstallUISequence:FirstDialog\tInstalled AND PATCH\t1298", | ||
| 61 | "InstallUISequence:LaunchConditions\t\t100", | ||
| 62 | "InstallUISequence:MigrateFeatureStates\t\t1200", | ||
| 63 | "InstallUISequence:SecondDialog\tNOT Installed\t1299", | ||
| 64 | "InstallUISequence:ValidateProductID\t\t700", | ||
| 65 | }, results); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
| 69 | } | ||
