Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/__tests__/components/InlineTags.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("InlineTags", () => {
const onUpdate = vi.fn();
const process = { tags: ["react"] };
render(<InlineTags process={process} onUpdate={onUpdate} />);
const input = screen.getByPlaceholderText("+ adicionar tag");
const input = screen.getByPlaceholderText("+ tag");
fireEvent.change(input, { target: { value: "typescript" } });
fireEvent.keyDown(input, { key: "Enter" });
expect(onUpdate).toHaveBeenCalledWith({ tags: ["react", "typescript"] });
Expand All @@ -44,7 +44,7 @@ describe("InlineTags", () => {
const onUpdate = vi.fn();
const process = { tags: [] };
render(<InlineTags process={process} onUpdate={onUpdate} />);
const input = screen.getByPlaceholderText("+ adicionar tag");
const input = screen.getByPlaceholderText("+ tag");
fireEvent.change(input, { target: { value: "nextjs" } });
fireEvent.blur(input);
expect(onUpdate).toHaveBeenCalledWith({ tags: ["nextjs"] });
Expand All @@ -54,7 +54,7 @@ describe("InlineTags", () => {
const onUpdate = vi.fn();
const process = { tags: ["react"] };
render(<InlineTags process={process} onUpdate={onUpdate} />);
const input = screen.getByPlaceholderText("+ adicionar tag");
const input = screen.getByPlaceholderText("+ tag");
fireEvent.change(input, { target: { value: "react" } });
fireEvent.keyDown(input, { key: "Enter" });
expect(onUpdate).not.toHaveBeenCalled();
Expand All @@ -64,7 +64,7 @@ describe("InlineTags", () => {
const onUpdate = vi.fn();
const process = { tags: ["react"] };
render(<InlineTags process={process} onUpdate={onUpdate} />);
const input = screen.getByPlaceholderText("+ adicionar tag");
const input = screen.getByPlaceholderText("+ tag");
fireEvent.change(input, { target: { value: " " } });
fireEvent.blur(input);
expect(onUpdate).not.toHaveBeenCalled();
Expand Down
4 changes: 2 additions & 2 deletions src/components/process/InlineTags.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export function InlineTags({ process, onUpdate }) {
onChange={e=>setNewTag(e.target.value)}
onKeyDown={e=>{ if(e.key==="Enter"){e.preventDefault();addTag();} }}
onBlur={addTag}
placeholder="+ adicionar tag"
style={{ padding:"3px 8px", borderRadius:6, border:"1px dashed var(--border-md)", background:"transparent", color:"var(--t2)", fontSize:12, fontFamily:"'JetBrains Mono',monospace", outline:"none", minWidth:110, width:"auto" }}
placeholder="+ tag"
style={{ padding:"3px 10px", borderRadius:6, border:"1px dashed var(--border-md)", background:"transparent", color:"var(--t2)", fontSize:12, fontFamily:"'JetBrains Mono',monospace", outline:"none", width:64, textAlign:"center" }}
/>
</div>
);
Expand Down
Loading