Skip to content

docs(AGENTS): clarify unit test command syntax and constraints#2068

Open
chintankavathia wants to merge 18 commits into
mainfrom
chore/agents/add-test-commands
Open

docs(AGENTS): clarify unit test command syntax and constraints#2068
chintankavathia wants to merge 18 commits into
mainfrom
chore/agents/add-test-commands

Conversation

@chintankavathia
Copy link
Copy Markdown
Member

@chintankavathia chintankavathia commented May 15, 2026

AI agents often try unsupported flags like --reporter or use npx ng test instead of the correct npm run scripts. Add explicit examples, supported flags, and a "do not use" list to prevent trial-and-error when running tests.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

chintankavathia and others added 17 commits May 12, 2026 13:36
…kerConfig

BREAKING CHANGE: `CriterionDefinition.datepickerConfig` type narrowed

The type of `datepickerConfig` in `CriterionDefinition` (filtered-search) changed from `DatepickerInputConfig` to `Omit<DatepickerInputConfig, 'enableDateRange' | 'enableTwoMonthDateRange'>`.

The properties `enableDateRange` and `enableTwoMonthDateRange ` are no longer accepted in `datepickerConfig` when used with filtered-search criteria, as they had no effect in that context.

Migration: Remove any `enableDateRange` and `enableTwoMonthDateRange` properties from your `datepickerConfig` objects passed to `CriterionDefinition`.
Adding a set of utilities that allows customers
to create selects with custom backed value selection,
for instance using `si-tree-view`.

A very simple version of it can look like this:

```ts
@component({
  selector: 'app-tree-select',
  imports: [SiSelectComboboxComponent, SiSelectDropdownDirective, SiTreeViewComponent],
  template: `
    <si-select-combobox>
      @if (select.value(); as val) {
        {{ val }}
      } @else {
        <span class="text-secondary">Select a location...</span>
      }
    </si-select-combobox>

    <ng-template si-select-dropdown>
      <si-tree-view
        class="d-block"
        ariaLabel="Locations"
        [items]="items()"
        [enableSelection]="true"
        [singleSelectMode]="true"
        [isVirtualized]="false"
        (treeItemClicked)="selectItem($event)"
      />
    </ng-template>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
  hostDirectives: [
    {
      directive: SiCustomSelectDirective,
      inputs: ['disabled', 'readonly', 'value'],
      outputs: ['valueChange']
    }
  ]
})
export class TreeSelectComponent {
  protected readonly select = inject(SiCustomSelectDirective);

  /** The tree items to display. */
  readonly items = input<TreeItem[]>([]);

  selectItem(item: TreeItem): void {
    if (item.label) {
      this.select.updateValue(item.label as string);
      this.select.close();
    }
  }
}
```

The goal is to empower applications
to build selects with whatever content they need
while we take care of accesibility and proper appereance.

Closes #1840
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates AGENTS.md by adding a comprehensive "Running Tests" section. This new documentation provides specific instructions for running unit tests using Vitest across various project paths, executing schematics tests, and performing E2E tests using a local script. It also includes details on environment requirements like Docker or Podman and commands for updating snapshots. I have no feedback to provide as there were no review comments.

AI agents often try unsupported flags like --reporter or use
npx ng test instead of the correct npm run scripts. Add explicit
examples, supported flags, and a "do not use" list to prevent
trial-and-error when running tests.
@chintankavathia chintankavathia force-pushed the chore/agents/add-test-commands branch from feaabf1 to 2008b64 Compare May 15, 2026 06:12
@chintankavathia chintankavathia marked this pull request as ready for review May 15, 2026 07:14
@chintankavathia chintankavathia requested a review from a team as a code owner May 15, 2026 07:14
@kfenner kfenner requested review from a team and spliffone as code owners May 20, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants