Skip to content

Commit 3adee5f

Browse files
authored
Review feedback on dashboard skill (#14642)
* Review feedback on dashboard skill * Apply suggestion from @JamesNK
1 parent b4fa644 commit 3adee5f

File tree

1 file changed

+7
-6
lines changed
  • .github/skills/dashboard-testing

1 file changed

+7
-6
lines changed

.github/skills/dashboard-testing/SKILL.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public abstract class DashboardTestContext : TestContext
128128

129129
```csharp
130130
using Aspire.Dashboard.Components.Tests.Shared;
131-
using Aspire.Dashboard.Tests.Shared;
131+
using Aspire.Tests.Shared.DashboardModel;
132+
using Aspire.Dashboard.Model;
132133
using Bunit;
133134
using Xunit;
134135

@@ -151,7 +152,7 @@ public class ResourceDetailsTests : DashboardTestContext
151152
var cut = RenderComponent<ResourceDetails>(builder =>
152153
{
153154
builder.Add(p => p.Resource, resource);
154-
builder.Add(p => p.ShowSpecificProperties, true);
155+
builder.Add(p => p.ShowSpecOnlyToggle, true);
155156
});
156157

157158
// Assert — query the rendered DOM
@@ -185,7 +186,7 @@ public partial class ResourcesTests : DashboardTestContext
185186
var viewport = new ViewportInformation(IsDesktop: true, IsUltraLowHeight: false, IsUltraLowWidth: false);
186187
var initialResources = new List<ResourceViewModel>
187188
{
188-
ModelTestHelpers.CreateResource("Resource1", "Type1", "Running"),
189+
ModelTestHelpers.CreateResource(resourceName: "Resource1", resourceType: "Type1", state: KnownResourceState.Running),
189190
};
190191
var channel = Channel.CreateUnbounded<IReadOnlyList<ResourceViewModelChange>>();
191192
var dashboardClient = new TestDashboardClient(
@@ -284,7 +285,7 @@ internal static class MyFeatureSetupHelpers
284285

285286
## Shared Test Fakes
286287

287-
Both test projects share hand-rolled fakes from `tests/Shared/`. No mocking framework is used.
288+
Both test projects use hand-rolled fakes — no mocking framework is used. Cross-project fakes live in `tests/Shared/` (e.g., `TestDashboardClient`, `ModelTestHelpers`), while bUnit-specific fakes live in `tests/Aspire.Dashboard.Components.Tests/Shared/` (e.g., `TestLocalStorage`, `TestTimeProvider`).
288289

289290
| Fake | Purpose |
290291
|------|---------|
@@ -326,9 +327,9 @@ var resource = ModelTestHelpers.CreateResource(
326327

327328
## Test Conventions
328329

329-
### DO: Use `[UseCulture("en-US")]` on Component Tests
330+
### DO: Use `[UseCulture("en-US")]` for Culture-Sensitive Component Tests
330331

331-
All bUnit test classes should be decorated with `[UseCulture("en-US")]` for deterministic formatting:
332+
Apply `[UseCulture("en-US")]` to bUnit test classes that assert culture-sensitive formatting (for example, numbers or dates) so those tests run deterministically across environments:
332333

333334
```csharp
334335
[UseCulture("en-US")]

0 commit comments

Comments
 (0)