Skip to content

Commit d244f47

Browse files
Copilotmo-esmp
andcommitted
Final dashboard implementation - complete and tested
Co-authored-by: mo-esmp <[email protected]>
1 parent 8f11b74 commit d244f47

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Serilog.Ui.RavenDbProvider/RavenDbDataProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ SortDirection sortBy
106106
};
107107
}
108108

109+
/// <inheritdoc/>
109110
public async Task<DashboardModel> FetchDashboardAsync(CancellationToken cancellationToken = default)
110111
{
111112
var dashboard = new DashboardModel();

tests/Serilog.Ui.Web.Tests/Endpoints/SerilogUiEndpointsTest.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,17 @@ public async Task It_serializes_an_error_on_exception()
118118
[Fact]
119119
public async Task It_returns_dashboard_data()
120120
{
121-
// Arrange / Act
121+
// Arrange - Setup proper query string
122+
_testContext.Request.QueryString = new QueryString("");
123+
124+
// Act
122125
var result = await HappyPath<DashboardModel>(_sut.GetDashboardAsync);
123126

124-
// Assert - Let's see what we actually get first
127+
// Assert - Match FakeProvider dashboard data
125128
result.Should().NotBeNull();
126-
result.TotalLogs.Should().Be(100); // Should match FakeProvider
129+
result.TotalLogs.Should().Be(100);
127130
result.LogsByLevel.Should().ContainKey("Information");
131+
result.LogsByLevel["Information"].Should().Be(100);
128132
result.TodayLogs.Should().Be(10);
129133
result.TodayErrorLogs.Should().Be(1);
130134
}

0 commit comments

Comments
 (0)