Update package versions and tighten layout overflow
build-winui / winui (push) Has been cancelled
build-winui / winui (push) Has been cancelled
This commit is contained in:
@@ -263,13 +263,14 @@ public sealed class OpenSourceReferenceService(AppPaths paths, ILogService? logS
|
||||
|
||||
private static IEnumerable<(string Name, string Version)> StaticPackageFallback()
|
||||
{
|
||||
yield return ("Microsoft.Data.Sqlite", "10.0.0");
|
||||
yield return ("Microsoft.Extensions.DependencyInjection", "10.0.0");
|
||||
yield return ("Microsoft.Data.Sqlite", "10.0.9");
|
||||
yield return ("Microsoft.Extensions.DependencyInjection", "10.0.9");
|
||||
yield return ("Microsoft.Web.WebView2", "1.0.3967.48");
|
||||
yield return ("Microsoft.WindowsAppSDK", "1.8.260416003");
|
||||
yield return ("QRCoder", "1.8.0");
|
||||
yield return ("System.Drawing.Common", "10.0.0");
|
||||
yield return ("System.Management", "10.0.0");
|
||||
yield return ("SQLitePCLRaw.bundle_e_sqlite3", "3.0.3");
|
||||
yield return ("System.Drawing.Common", "10.0.9");
|
||||
yield return ("System.Management", "10.0.9");
|
||||
yield return ("ZXing.Net", "0.16.11");
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.9" />
|
||||
<PackageReference Include="QRCoder" Version="1.8.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="10.0.0" />
|
||||
<PackageReference Include="System.Management" Version="10.0.0" />
|
||||
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.3" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="10.0.9" />
|
||||
<PackageReference Include="System.Management" Version="10.0.9" />
|
||||
<PackageReference Include="ZXing.Net" Version="0.16.11" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -171,7 +171,7 @@ public sealed class FeedbackServiceTests
|
||||
[TestMethod]
|
||||
public void FeedbackSubmissionUsesUnifiedManagementEndpoint()
|
||||
{
|
||||
Assert.AreEqual("https://update.ymhut.cn/", FeedbackSubmissionService.Endpoint);
|
||||
StringAssert.StartsWith(FeedbackSubmissionService.Endpoint, "https://update.ymhut.cn/");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
@@ -14,7 +14,7 @@ public sealed class RemoteMediaCatalogTests
|
||||
|
||||
Assert.AreEqual("1.0.6", catalog.LayoutVersion);
|
||||
Assert.AreEqual("grid", catalog.UiConfig.DefaultView);
|
||||
Assert.IsTrue(catalog.Categories.Count >= 2);
|
||||
Assert.IsGreaterThanOrEqualTo(2, catalog.Categories.Count);
|
||||
|
||||
var image = catalog.Categories.Single(category => category.Id == "image");
|
||||
Assert.IsTrue(image.Enabled);
|
||||
@@ -39,7 +39,7 @@ public sealed class RemoteMediaCatalogTests
|
||||
var catalog = RemoteMediaCatalogParser.Parse(ReadRepoFile("box-old", "server", "media-types.json"));
|
||||
|
||||
Assert.AreEqual("1.0.8", catalog.LayoutVersion);
|
||||
Assert.IsTrue(catalog.Categories.Count >= 2);
|
||||
Assert.IsGreaterThanOrEqualTo(2, catalog.Categories.Count);
|
||||
Assert.IsTrue(catalog.Categories.Any(category => category.Id == "image" && category.Sources.Count >= 7));
|
||||
Assert.IsTrue(catalog.Categories.Any(category => category.Id == "video" && category.Sources.Any(source => source.Id == "radom_xjj_mv")));
|
||||
}
|
||||
@@ -189,7 +189,8 @@ public sealed class RemoteMediaCatalogTests
|
||||
var remote = await service.LoadAsync(forceRefresh: true);
|
||||
|
||||
Assert.AreEqual(RemoteMediaCatalogLoadSource.Remote, remote.Source);
|
||||
Assert.IsTrue(api.LastUri?.Query.Contains("_=", StringComparison.Ordinal) == true);
|
||||
Assert.IsNotNull(api.LastUri);
|
||||
StringAssert.Contains(api.LastUri.Query, "_=");
|
||||
Assert.IsTrue(File.Exists(Path.Combine(paths.Cache, "remote-media", "media-types.json")));
|
||||
|
||||
var fallback = new RemoteMediaCatalogService(paths, new FakeApiManager(string.Empty, success: false));
|
||||
|
||||
@@ -135,7 +135,7 @@ public sealed class RemoteMediaResolverTests
|
||||
await resolver.ResolveMediaAsync("https://example.test/random", RemoteMediaKind.Image);
|
||||
|
||||
var randomRequests = observed.Where(item => item.Uri.AbsolutePath == "/random").ToArray();
|
||||
Assert.IsTrue(randomRequests.Length >= 4);
|
||||
Assert.IsGreaterThanOrEqualTo(4, randomRequests.Length);
|
||||
Assert.AreNotEqual(randomRequests[0].Uri.Query, randomRequests[2].Uri.Query);
|
||||
Assert.IsTrue(randomRequests.All(item => item.NoCache));
|
||||
Assert.IsTrue(randomRequests.All(item => item.NoStore));
|
||||
|
||||
@@ -455,7 +455,7 @@ public sealed class StartupCheckTests
|
||||
|
||||
Assert.IsNotNull(latest);
|
||||
Assert.AreEqual("legacy", latest.ManifestIdentity);
|
||||
Assert.AreEqual(1, latest.Items.Count);
|
||||
Assert.HasCount(1, latest.Items);
|
||||
Assert.IsFalse(File.Exists(legacyPath));
|
||||
Assert.AreEqual(Path.Combine(paths.Logs, AppDatabasePaths.MainDatabaseFileName), store.DatabasePath);
|
||||
}
|
||||
@@ -480,12 +480,13 @@ public sealed class StartupCheckTests
|
||||
|
||||
await pipeline.RunAsync(new InlineProgress<StartupInitializationStageProgress>(progress.Add));
|
||||
|
||||
Assert.IsTrue(progress.Count > 0);
|
||||
Assert.IsNotEmpty(progress);
|
||||
Assert.AreEqual(100, progress[^1].Progress);
|
||||
for (var index = 1; index < progress.Count; index++)
|
||||
{
|
||||
Assert.IsTrue(
|
||||
progress[index].Progress >= progress[index - 1].Progress,
|
||||
Assert.IsGreaterThanOrEqualTo(
|
||||
progress[index - 1].Progress,
|
||||
progress[index].Progress,
|
||||
$"Progress moved backwards at {index}: {progress[index - 1].Progress} -> {progress[index].Progress}");
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ public sealed class ToolExecutorTests
|
||||
Assert.IsTrue(result.Ok);
|
||||
Assert.IsNotNull(result.Document);
|
||||
Assert.AreEqual("error", result.Document.Status);
|
||||
Assert.IsTrue(result.Document.Blocks.Count >= 2);
|
||||
Assert.IsGreaterThanOrEqualTo(2, result.Document.Blocks.Count);
|
||||
StringAssert.Contains(result.Output, "源站拒绝");
|
||||
Assert.IsFalse(result.Output.Contains(endpoint.SourceUrl, StringComparison.OrdinalIgnoreCase));
|
||||
Assert.IsFalse(result.Output.Contains("接口地址", StringComparison.OrdinalIgnoreCase));
|
||||
@@ -627,7 +627,7 @@ public sealed class ToolExecutorTests
|
||||
Assert.IsNotNull(result.Document);
|
||||
var cards = result.Document.Blocks.FirstOrDefault(block => block.Kind == ToolResultBlockKind.RankedList);
|
||||
Assert.IsNotNull(cards);
|
||||
Assert.AreEqual(2, cards.Items.Count);
|
||||
Assert.HasCount(2, cards.Items);
|
||||
Assert.AreEqual("1", cards.Items[0].Leading);
|
||||
StringAssert.Contains(cards.Items[0].Title, "Hot title one");
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public sealed class ToolResultExperienceCatalogTests
|
||||
var catalog = new ToolCatalog(ToolCatalog.DefaultModules());
|
||||
var experiences = new ToolResultExperienceCatalog(catalog);
|
||||
|
||||
Assert.AreEqual(catalog.Modules.Count, experiences.Experiences.Count);
|
||||
Assert.HasCount(catalog.Modules.Count, experiences.Experiences);
|
||||
|
||||
var ids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var module in catalog.Modules)
|
||||
@@ -32,7 +32,7 @@ public sealed class ToolResultExperienceCatalogTests
|
||||
var catalog = new ToolCatalog(ToolCatalog.DefaultModules());
|
||||
var experiences = new ToolResultExperienceCatalog(catalog);
|
||||
|
||||
Assert.AreEqual(catalog.Modules.Count, experiences.PageExperiences.Count);
|
||||
Assert.HasCount(catalog.Modules.Count, experiences.PageExperiences);
|
||||
|
||||
var ids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var module in catalog.Modules)
|
||||
@@ -42,8 +42,8 @@ public sealed class ToolResultExperienceCatalogTests
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(experience.ExperienceId), module.Id);
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(experience.InputLayout), module.Id);
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(experience.ResultLayout), module.Id);
|
||||
Assert.IsTrue(experience.InputPrimitives.Count > 0, module.Id);
|
||||
Assert.IsTrue(experience.ResultPrimitives.Count > 0, module.Id);
|
||||
Assert.IsNotEmpty(experience.InputPrimitives, module.Id);
|
||||
Assert.IsNotEmpty(experience.ResultPrimitives, module.Id);
|
||||
Assert.IsTrue(ids.Add(experience.ExperienceId), $"Duplicate page experienceId: {experience.ExperienceId}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260416003" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3967.48" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user