Import normalizer: offline tool to normalize the raw archive spreadsheets #663
@@ -283,7 +283,15 @@ describe('PersonMentionEditor — AC-2/3: search input drives fetch', () => {
|
||||
|
||||
const fetchesBeforeClear = fetchMock.mock.calls.length;
|
||||
|
||||
await userEvent.clear(page.getByRole('searchbox'));
|
||||
// `fill('')` atomically sets the input value in a single input event —
|
||||
// same rationale as the `fill('Walter')` call above. `userEvent.clear`
|
||||
// deletes per-keystroke, so intermediate values 'Au'/'A' transit through
|
||||
// the bound `searchQuery` and each schedules a debounced fetch. Under
|
||||
// CI-runner jitter, if two consecutive keystrokes land more than
|
||||
// SEARCH_DEBOUNCE_MS (150 ms) apart, an intermediate timer fires before
|
||||
// the input reaches '' and adds a phantom call — unrelated to the
|
||||
// contract under test, which is "empty query => no fetch".
|
||||
await page.getByRole('searchbox').fill('');
|
||||
|
||||
// Negative assertion: wait past the debounce window to confirm no
|
||||
// trailing fetch was scheduled. Removing this wait would mask a
|
||||
|
||||
Reference in New Issue
Block a user