Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .agents/skills/write-library-tests/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ Three test projects under `tests/`, two suites:
| Behavior | Where it's tested |
|---|---|
| Property → rendered attribute (direct-render components) | unit: plain bUnit facts (`cut.Find(...).GetAttribute(...)`) |
| **Own element and render mode** — the component renders its web component's tag as its root, with `data-ig-root` when the client renderer drives it through descriptions (Calendar, Chat, Color Picker, Combo, Date Picker, Date Range Picker, Date Time Input, Mask Input) | unit: a `<Name>_RendersCorrectElement` fact in every component's suite, `cut.Find("igc-<tag>")`; for a renderer-driven component also assert `data-ig-root` on it, since that attribute picks the client path |
| Markup/child content rendering | unit: plain bUnit facts |
| **Parent/child collection membership** — a child registering itself into its parent's collection and leaving again over the child's lifetime | unit: plain bUnit facts in the *parent's* suite, in a `#region Child collection lifecycle` — membership only; name resolution *off* that collection is interop behavior and stays in the contract |
| Message-borne state serialization shapes | unit: `EnumSerializationTests` / `RenderingSerializationTests` |
| **Interop wire behavior** — method identifiers, argument serialization + type tags, return decoding, event-handler registration/removal transmissions + JS→.NET event dispatch, `@bind-` two-way round trips, interop-borne props/data | unit: the component's `ComponentContract` — full authoring guide: [`references/interop-contracts.md`](./references/interop-contracts.md) |
| `<Member>Script` parameters (JS-side handlers/providers) | unit: automated sweep (`ScriptPropTests`, all components at once — no per-contract entries, no integration coverage exists) |
| `<Member>Script` parameters (JS-side handlers/providers) | unit: automated sweep (`ScriptPropTests`, all components at once; a base class is swept through the components derived from it — no per-contract entries, no integration coverage exists) |
| End-to-end prop/event/method behavior against the **real web component in a real browser** | integration: the TestBed sweep |
| Visual output, client-side component logic | integration / e2e — never unit |

Expand Down Expand Up @@ -80,7 +81,7 @@ over the component's public surface —

## Adding coverage for a new component — checklist

1. Unit suite: bUnit facts for rendered attributes/markup; if the component has an interop surface (it sends interop invocations or registers JS-originated event handlers — the reference explains how to identify these per stack), add a `ComponentContract` per [`references/interop-contracts.md`](./references/interop-contracts.md). For a brand-new component this works TDD-style: author the contract first from the intended API following the library's conventions; the contract doubles as the API design record (spec mode in the reference).
1. Unit suite: a `<Name>_RendersCorrectElement` fact (own element, plus `data-ig-root` if renderer-driven), bUnit facts for rendered attributes/markup; if the component has an interop surface (it sends interop invocations or registers JS-originated event handlers — the reference explains how to identify these per stack), add a `ComponentContract` per [`references/interop-contracts.md`](./references/interop-contracts.md). For a brand-new component this works TDD-style: author the contract first from the intended API following the library's conventions; the contract doubles as the API design record (spec mode in the reference).
2. If it is a parent that collects children, or a child that registers with a parent, exercise that membership **over the child's lifetime**, not just at first render: the children are the collection in order, a disposed child leaves it, all disposed empties it. Keep these facts to membership and asserting resolution that are covered by the interop contract.
3. Integration: the sweep picks the component up automatically; add `componentsConfig.json` entries only for members the generic sweep genuinely cannot model (cite why), and mirror each exclusion with unit contract coverage.
4. Verify: unit full-suite on all TFMs, plus the component's integration fixture.
15 changes: 0 additions & 15 deletions src/components/Blazor/Accordion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Avatar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Badge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Banner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
33 changes: 0 additions & 33 deletions src/components/Blazor/BaseAlertLike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,6 @@ public partial class IgbBaseAlertLike : IgbComponentBase
/// <inheritdoc />
internal override string RendererType { get { return "WebBaseAlertLike"; } }

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override string DirectRenderElementName
{
get
{
return "igc-base-alert-like";
}
}

/// <inheritdoc />
private protected override ControlEventBehavior DefaultEventBehavior
{
Expand Down
6 changes: 0 additions & 6 deletions src/components/Blazor/BaseComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ public partial class IgbBaseComboBox : IgbComponentBase
/// <inheritdoc />
internal override string RendererType { get { return "WebBaseComboBox"; } }

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override ControlEventBehavior DefaultEventBehavior
{
Expand Down
33 changes: 0 additions & 33 deletions src/components/Blazor/BaseOptionLike.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,6 @@ public partial class IgbBaseOptionLike<TValue> : IgbComponentBase
/// <inheritdoc />
internal override string RendererType { get { return "WebBaseOptionLike"; } }

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override string DirectRenderElementName
{
get
{
return "igc-base-option-like";
}
}

/// <inheritdoc />
private protected override ControlEventBehavior DefaultEventBehavior
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Breadcrumb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Breadcrumbs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
33 changes: 0 additions & 33 deletions src/components/Blazor/ButtonBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,6 @@ public partial class IgbButtonBase : IgbComponentBase
/// <inheritdoc />
internal override string RendererType { get { return "WebButtonBase"; } }

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override string DirectRenderElementName
{
get
{
return "igc-button-base";
}
}

/// <inheritdoc />
private protected override ControlEventBehavior DefaultEventBehavior
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/ButtonGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
9 changes: 0 additions & 9 deletions src/components/Blazor/Calendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override string DirectRenderElementName
{
Expand Down
6 changes: 0 additions & 6 deletions src/components/Blazor/CalendarBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ public partial class IgbCalendarBase : IgbComponentBase
/// <inheritdoc />
internal override string RendererType { get { return "WebCalendarBase"; } }

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override ControlEventBehavior DefaultEventBehavior
{
Expand Down
15 changes: 0 additions & 15 deletions src/components/Blazor/Card.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded()
}
}

/// <inheritdoc />
private protected override string ResolveDisplay()
{
return "inline-block";
}

/// <inheritdoc />
private protected override bool SupportsVisualChildren
{
get
{
return true;
}
}

/// <inheritdoc />
private protected override bool UseDirectRender
{
Expand Down
Loading
Loading