fix(web): resolve flaky CI test failures (#433)
All checks were successful
ci/woodpecker/push/web Pipeline was successful
All checks were successful
ci/woodpecker/push/web Pipeline was successful
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #433.
This commit is contained in:
@@ -46,8 +46,8 @@ describe("FilterBar", (): void => {
|
|||||||
it("should debounce search input", async (): Promise<void> => {
|
it("should debounce search input", async (): Promise<void> => {
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
|
|
||||||
// Use a very short debounce to test the behavior without flaky timing
|
// Use a debounce long enough that CI environments don't fire it between keystrokes
|
||||||
render(<FilterBar onFilterChange={mockOnFilterChange} debounceMs={100} />);
|
render(<FilterBar onFilterChange={mockOnFilterChange} debounceMs={500} />);
|
||||||
|
|
||||||
const searchInput = screen.getByPlaceholderText(/search/i);
|
const searchInput = screen.getByPlaceholderText(/search/i);
|
||||||
mockOnFilterChange.mockClear();
|
mockOnFilterChange.mockClear();
|
||||||
@@ -71,7 +71,7 @@ describe("FilterBar", (): void => {
|
|||||||
expect.objectContaining({ search: "test" })
|
expect.objectContaining({ search: "test" })
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
{ timeout: 200 }
|
{ timeout: 1000 }
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify it was only called once (debounced)
|
// Verify it was only called once (debounced)
|
||||||
|
|||||||
Reference in New Issue
Block a user