-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All
WasmBuildTests
use static project from assets or dotnet new
, …
…unification of browser tests (#109069) * Fix build errors in WASI - refactor of WASI in a future PR. * Fix binlog location. * Update README. * Feedback: non-nullable _projectDir. * Fix `SatelliteAssembliesTests` and other test that require 3 states of `WasmBuildNative` * `RebuildTests` fix after introducing figerprinting. * Fix no-worklod tests: 1) do not double-assert `AssertRuntimePackPath` in blazor 2) `AssertRuntimePackPath` is correct only when workload is there 3) NativeBuild should allow undefined in blazor tests as well. * Fix `NativeBuildTests` - AppBundle was not asserted here originally. * `WasmGenerateAppBundle=false` when workloads used (set in workload manifest). The check is incorrect in the current process of testing. * Fix `MainWithArgsTests`. Url query can have arg key duplicates -> is better represented by `NameValueCollection` than `Dictionary` * AppBundle was never asserted for size in `OptimizationFlagChangeTests` + use statistics that are fingerprinting insensitive. * Reading from config is a known issue. * Fix `ReferenceNewAssemblyRebuildTest`: Json lib was already referenced before the change in the test. Use Cryptography lib instead. * Keep blazor workload tests together. * Fix: `PInvokeTableGeneratorTests` on Windows. * Move all no-workload blazor tests to one class. * Use more meaningful name for `MiscTests3`. * `PInvokeTableGeneratorTests` takes 2-3 times more time than average WBT class, divide it. * Block the timeouting test with exisiting issue. * Try avoiding port collisions in blazor tests run on kestrel. * Removal of files and comments that were supposed to be deleted after approval.
- Loading branch information
1 parent
c646425
commit f30cfc0
Showing
159 changed files
with
3,912 additions
and
5,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Specialized; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
#nullable enable | ||
|
||
namespace Wasm.Build.Tests; | ||
|
||
public class AppSettingsTests : WasmTemplateTestsBase | ||
{ | ||
public AppSettingsTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) | ||
: base(output, buildContext) | ||
{ | ||
} | ||
|
||
[Theory] | ||
[InlineData("Development")] | ||
[InlineData("Production")] | ||
public async Task LoadAppSettingsBasedOnApplicationEnvironment(string applicationEnvironment) | ||
{ | ||
Configuration config = Configuration.Debug; | ||
ProjectInfo info = CopyTestAsset(config, aot: false, TestAsset.WasmBasicTestApp, "AppSettingsTest"); | ||
PublishProject(info, config); | ||
BrowserRunOptions options = new( | ||
config, | ||
TestScenario: "AppSettingsTest", | ||
BrowserQueryString: new NameValueCollection { { "applicationEnvironment", applicationEnvironment } } | ||
); | ||
RunResult result = await RunForPublishWithWebServer(options); | ||
Assert.Contains(result.TestOutput, m => m.Contains("'/appsettings.json' exists 'True'")); | ||
Assert.Contains(result.TestOutput, m => m.Contains($"'/appsettings.Development.json' exists '{applicationEnvironment == "Development"}'")); | ||
Assert.Contains(result.TestOutput, m => m.Contains($"'/appsettings.Production.json' exists '{applicationEnvironment == "Production"}'")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/mono/wasm/Wasm.Build.Tests/Blazor/BlazorBuildOptions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
src/mono/wasm/Wasm.Build.Tests/Blazor/BlazorWasmProjectProvider.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.