Skip to content

Commit e51f6ca

Browse files
only21milclaude
andcommitted
test(web): assert project name focus and value through expect.element
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 82f1b55 commit e51f6ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/settings/ProjectSettingsPanel.browser.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,13 @@ describe("project name composition", () => {
568568
);
569569
});
570570
expect(state.update).not.toHaveBeenCalled();
571-
expect(document.activeElement).toBe(input);
571+
await expect.element(input).toHaveFocus();
572572

573573
await userEvent.type(input, "語");
574574
await userEvent.keyboard("{Enter}");
575575
await vi.waitFor(() => expect(state.update).toHaveBeenCalledTimes(2));
576576
expect(state.projects.map((project) => project.title)).toEqual(["日本語", "日本語"]);
577-
expect(nameInput(screen).value).toBe("日本語");
577+
await expect.element(nameInput(screen)).toHaveValue("日本語");
578578

579579
await userEvent.fill(nameInput(screen), "日本語の名前");
580580
await userEvent.keyboard("{Tab}");

0 commit comments

Comments
 (0)