test(ui): read notification colors from app theme
This commit is contained in:
+6
-4
@@ -11,18 +11,20 @@
|
|||||||
the Shape block; focused test passes. This task is ready to commit.
|
the Shape block; focused test passes. This task is ready to commit.
|
||||||
- `GeometryFieldWidthTests` now identifies the shared draggable-layer Geometry block; focused test
|
- `GeometryFieldWidthTests` now identifies the shared draggable-layer Geometry block; focused test
|
||||||
passes. This task is ready to commit.
|
passes. This task is ready to commit.
|
||||||
- Clean app build is 0 warnings. Full suite: 9 failed / 513 passed of 522; remaining failures are
|
- `NotificationServiceTests` now run tint assertions with the real theme resources and expect the
|
||||||
|
current `Brush.ErrorContainer` token; all 8 tests in that class pass. This task is ready to commit.
|
||||||
|
- Clean app build is 0 warnings. Full suite: 5 failed / 517 passed of 522; remaining failures are
|
||||||
being handled one task and one local commit at a time.
|
being handled one task and one local commit at a time.
|
||||||
|
|
||||||
## Next action
|
## Next action
|
||||||
|
|
||||||
Commit the Geometry selector update, then take the next remaining failure. Do not
|
Commit the notification tint test fix, then take the next remaining failure. Do not push absent a
|
||||||
push absent a milestone/checkpoint request.
|
milestone/checkpoint request.
|
||||||
|
|
||||||
## Landmines
|
## Landmines
|
||||||
|
|
||||||
- Build/test with Windows `dotnet.exe`; the full suite can hang in WASAPI teardown.
|
- Build/test with Windows `dotnet.exe`; the full suite can hang in WASAPI teardown.
|
||||||
- `verify.sh` cannot pass until the remaining 9 suite failures are resolved; scope checks are run
|
- `verify.sh` cannot pass until the remaining 5 suite failures are resolved; scope checks are run
|
||||||
separately when that gate exits early.
|
separately when that gate exits early.
|
||||||
- Any integration test constructing `MainWindow` must set `LayoutPathOverride` to a temporary DB
|
- Any integration test constructing `MainWindow` must set `LayoutPathOverride` to a temporary DB
|
||||||
and clear it in `finally`.
|
and clear it in `finally`.
|
||||||
|
|||||||
@@ -11,8 +11,13 @@ namespace ytLive.Tests;
|
|||||||
/// Errors must never auto-expire (sticky until dismissed); the rest get short
|
/// Errors must never auto-expire (sticky until dismissed); the rest get short
|
||||||
/// lifetimes; everything routes to the in-window ToastArea.
|
/// lifetimes; everything routes to the in-window ToastArea.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Collection("RealApp")]
|
||||||
public class NotificationServiceTests
|
public class NotificationServiceTests
|
||||||
{
|
{
|
||||||
|
private readonly RealAppHost _app;
|
||||||
|
|
||||||
|
public NotificationServiceTests(RealAppHost app) => _app = app;
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(AppNotificationSeverity.Info, 4)]
|
[InlineData(AppNotificationSeverity.Info, 4)]
|
||||||
[InlineData(AppNotificationSeverity.Success, 4)]
|
[InlineData(AppNotificationSeverity.Success, 4)]
|
||||||
@@ -39,11 +44,14 @@ public class NotificationServiceTests
|
|||||||
[InlineData(AppNotificationSeverity.Info, "#3a3b52")]
|
[InlineData(AppNotificationSeverity.Info, "#3a3b52")]
|
||||||
[InlineData(AppNotificationSeverity.Success, "#1d5c38")]
|
[InlineData(AppNotificationSeverity.Success, "#1d5c38")]
|
||||||
[InlineData(AppNotificationSeverity.Warning, "#b8860b")]
|
[InlineData(AppNotificationSeverity.Warning, "#b8860b")]
|
||||||
[InlineData(AppNotificationSeverity.Error, "#8f1f1f")]
|
[InlineData(AppNotificationSeverity.Error, "#93000a")]
|
||||||
public void Severities_Map_To_Dark_Card_Tints(AppNotificationSeverity severity, string expectedHex)
|
public void Severities_Map_To_Dark_Card_Tints(AppNotificationSeverity severity, string expectedHex)
|
||||||
{
|
{
|
||||||
var request = NotificationService.BuildRequest("Title", "Body", severity);
|
_app.Run(() =>
|
||||||
|
{
|
||||||
|
var request = NotificationService.BuildRequest("Title", "Body", severity);
|
||||||
|
|
||||||
Assert.Equal(expectedHex.ToLowerInvariant()[^6..], request.BackgroundColor!.Value.ToHex().ToLowerInvariant()[^6..]);
|
Assert.Equal(expectedHex.ToLowerInvariant()[^6..], request.BackgroundColor!.Value.ToHex().ToLowerInvariant()[^6..]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user