perf(ci): shorten WebUI feedback latency
Run WebUI checks/build and browser regressions on independent runners while preserving the existing webui aggregate check and every acceptance command. Advance the existing invalid-input validation windows with scoped fake timers instead of real sleeps.
This commit is contained in:
1 parent
11152626f8
commit
f869212e7d
2 files changed
+44
-6
No files matched your search
@@ -666,10 +666,12 @@ describe("Settings models", () => {
|
||||
await togglePresetEditor();
|
||||
fireEvent.click(screen.getByRole("button", { name: /Advanced options/ }));
|
||||
const input = screen.getByRole("textbox", { name: "Context window" });
|
||||
vi.useFakeTimers();
|
||||
fireEvent.change(input, { target: { value } });
|
||||
expect(input).toHaveAttribute("aria-invalid", "true");
|
||||
expect(input).toHaveAccessibleDescription("Enter a positive token count, such as 200k, 1m, or 131072.");
|
||||
await new Promise((resolve) => setTimeout(resolve, 750));
|
||||
await act(() => vi.advanceTimersByTimeAsync(750));
|
||||
vi.useRealTimers();
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
expect(input).toHaveValue(value);
|
||||
returnToPresetEditor();
|
||||
@@ -700,10 +702,12 @@ describe("Settings models", () => {
|
||||
input = screen.getByRole("textbox", { name: "Max output tokens" });
|
||||
expect(input).toHaveValue("32k");
|
||||
requestMutationMock.mockClear();
|
||||
vi.useFakeTimers();
|
||||
fireEvent.change(input, { target: { value: "" } });
|
||||
expect(input).toHaveAttribute("aria-invalid", "true");
|
||||
expect(presetSaveButton()).toBeDisabled();
|
||||
await new Promise((resolve) => setTimeout(resolve, 750));
|
||||
await act(() => vi.advanceTimersByTimeAsync(750));
|
||||
vi.useRealTimers();
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
fireEvent.change(input, { target: { value: "8.192k" } });
|
||||
returnToPresetEditor();
|
||||
|
||||
Reference in new issue
Block a user