diff --git a/ui/src/components/NewIssueDialog.test.tsx b/ui/src/components/NewIssueDialog.test.tsx index 129c7733e4a..7f986188e66 100644 --- a/ui/src/components/NewIssueDialog.test.tsx +++ b/ui/src/components/NewIssueDialog.test.tsx @@ -752,6 +752,28 @@ describe("NewIssueDialog", () => { act(() => root.unmount()); }); + it("keeps priority under the mobile overflow menu", async () => { + const { root } = renderDialog(container); + await flush(); + + const priorityChip = container.querySelector('[data-testid="new-issue-priority-chip"]'); + expect(priorityChip?.className).toContain("hidden"); + expect(priorityChip?.className).toContain("sm:inline-flex"); + + const highPriorityOption = container.querySelector('[data-testid="new-issue-more-priority-high"]'); + expect(highPriorityOption?.textContent).toContain("High"); + + await act(async () => { + highPriorityOption?.dispatchEvent(new MouseEvent("click", { bubbles: true })); + }); + await flush(); + + const selectedHighPriorityOption = container.querySelector('[data-testid="new-issue-more-priority-high"]'); + expect(selectedHighPriorityOption?.className).toContain("bg-accent"); + + act(() => root.unmount()); + }); + it("allows editor autocomplete portal pointer events inside the modal", async () => { const { root } = renderDialog(container); await flush(); diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx index 78c7e546467..6e4d306b7dc 100644 --- a/ui/src/components/NewIssueDialog.tsx +++ b/ui/src/components/NewIssueDialog.tsx @@ -1870,7 +1870,11 @@ export function NewIssueDialog() { {/* Priority chip */} - - + +
+
+ Priority +
+ {priorities.map((p) => ( + + ))} +
+