Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ jobs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: lts/krypton
cache: 'npm'
- run: npm ci --prefer-offline --no-audit --include=optional
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
path: all-blob-reports
Expand Down
40 changes: 0 additions & 40 deletions playwright-merge.config.ts

This file was deleted.

4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ const config: PlaywrightTestConfig = {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: `http://${localAddress}:${port}`,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: isCI ? 'on-first-retry' : 'retain-on-failure',
/* Retain a full trace from the failing attempt. See https://playwright.dev/docs/trace-viewer */
trace: 'retain-on-failure',

viewport: baseViewport,

Expand Down
4 changes: 4 additions & 0 deletions playwright/e2e/element-examples/si-filtered-search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ test.describe('filtered search', () => {
await expect(page.getByRole('option', { name: 'Karlsruhe' })).toHaveClass(/active/);
await page.keyboard.type('annover');
await expect(page.getByRole('option').first()).not.toBeVisible(); // Ensures that the view was updated by Angular after typing.
// Guard against dropped keystrokes under CPU load: confirm full value before committing.
await expect(
page.locator('.pill-group', { hasText: 'Location' }).getByRole('combobox')
).toHaveValue('Hannover');
await page.keyboard.press('Enter');
await expect(freeTextSearch).toBeFocused();
await freeTextSearch.fill('Building:House');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
*/
import { CdkMonitorFocus, FocusOrigin } from '@angular/cdk/a11y';
import {
afterNextRender,
ChangeDetectionStrategy,
Component,
computed,
ElementRef,
inject,
Injector,
input,
model,
OnInit,
Expand Down Expand Up @@ -48,6 +51,8 @@ import { SiFilteredSearchTypeaheadComponent } from './values/typeahead/si-filter
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SiFilteredSearchValueComponent implements OnInit {
private readonly injector = inject(Injector);

readonly value = model.required<CriterionValue>();
readonly definition = input.required<InternalCriterionDefinition>();
readonly disabled = input.required<boolean>();
Expand Down Expand Up @@ -123,16 +128,19 @@ export class SiFilteredSearchValueComponent implements OnInit {
this.active.set(true);
this.hasPendingFocus = true;

setTimeout(() => {
if (field === 'value') {
this.valueInput()?.focus();
} else if (field === 'operator') {
this.operatorInput()?.nativeElement.focus();
} else {
(this.operatorInput()?.nativeElement ?? this.valueInput())?.focus();
}
this.hasPendingFocus = false;
});
afterNextRender(
() => {
if (field === 'value') {
this.valueInput()?.focus();
} else if (field === 'operator') {
this.operatorInput()?.nativeElement.focus();
} else {
(this.operatorInput()?.nativeElement ?? this.valueInput())?.focus();
}
this.hasPendingFocus = false;
},
{ injector: this.injector }
);
}

protected backspaceOverflow(): void {
Expand Down
Loading