-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #5179: [frontend]: Push to Github button should only push branch, but not creating a PR #5181
Fix issue #5179: [frontend]: Push to Github button should only push branch, but not creating a PR #5181
Changes from 2 commits
157883f
f456410
59fc3af
bf6e2e0
b347226
125ca38
ede8a17
096f6b9
6d250a5
7733d0f
c3978b4
4a28111
c612826
dbb5ddf
4df8b6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,6 +281,31 @@ describe.skip("ChatInterface", () => { | |
expect(within(error).getByText("Something went wrong")).toBeInTheDocument(); | ||
}); | ||
|
||
it("should render both GitHub buttons when ghToken is available", () => { | ||
vi.mock("@remix-run/react", async (importActual) => ({ | ||
...(await importActual<typeof import("@remix-run/react")>()), | ||
useRouteLoaderData: vi.fn(() => ({ ghToken: "test-token" })), | ||
})); | ||
|
||
const messages: Message[] = [ | ||
{ | ||
sender: "assistant", | ||
content: "Hello", | ||
imageUrls: [], | ||
timestamp: new Date().toISOString(), | ||
}, | ||
]; | ||
renderChatInterface(messages); | ||
|
||
const pushButton = screen.getByRole("button", { name: "Push to GitHub" }); | ||
const prButton = screen.getByRole("button", { name: "Push & Create PR" }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think once the Once you click "Push & Create PR" we should just have one button that says "Push changes to PR" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done the most recent commit |
||
|
||
expect(pushButton).toBeInTheDocument(); | ||
expect(prButton).toBeInTheDocument(); | ||
expect(pushButton).toHaveTextContent("Push to GitHub"); | ||
expect(prButton).toHaveTextContent("Push & Create PR"); | ||
}); | ||
|
||
it("should render feedback actions if there are more than 3 messages", () => { | ||
const messages: Message[] = [ | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's name this
Push to Branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done