Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('PullRequestForm', () => {
expect(screen.getByLabelText(/commit message/i)).toBeTruthy();
expect(screen.getByLabelText(/branch name/i)).toBeTruthy();
expect(screen.getByRole('button', { name: /cancel/i })).toBeTruthy();
expect(screen.getByRole('button', { name: /create pr/i })).toBeTruthy();
expect(screen.getByRole('button', { name: 'Create pull request' })).toBeTruthy();
});

it('fetches branch name when toggle button is clicked', async () => {
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('PullRequestForm', () => {
target: { value: 'test-branch' },
});

fireEvent.click(screen.getByRole('button', { name: /create pr/i }));
fireEvent.click(screen.getByRole('button', { name: 'Create pull request' }));

await waitFor(() => {
expect(mockPostMessagePromise).toHaveBeenCalledWith(
Expand All @@ -132,7 +132,7 @@ describe('PullRequestForm', () => {
/>,
);

fireEvent.click(screen.getByRole('button', { name: /create pr/i }));
fireEvent.click(screen.getByRole('button', { name: 'Create pull request' }));

expect(mockPostMessagePromise).not.toHaveBeenCalled();
expect(mockOnPullRequestCreated).not.toHaveBeenCalled();
Expand Down
8 changes: 4 additions & 4 deletions src/react/atlascode/rovo-dev/create-pr/PullRequestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const PullRequestButton: React.FC<{
isLoading?: boolean;
}> = ({ onClick, isLoading }) => {
return (
<button className="pull-request-button" onClick={onClick} title="Create Pull Request">
<button className="pull-request-button" onClick={onClick} title="Create pull request">
{isLoading ? (
<i className="codicon codicon-loading codicon-modifier-spin" />
) : (
<PullRequestIcon label="Create Pull Request" spacing="none" />
<PullRequestIcon label="Create pull request" spacing="none" />
)}
Create Pull Request
Create pull request
</button>
);
};
Expand Down Expand Up @@ -133,7 +133,7 @@ export const PullRequestForm: React.FC<PullRequestFormProps> = ({
) : (
<PullRequestIcon label="pull-request-icon" spacing="none" />
)}
Create PR
Create pull request
</button>
</div>
</form>
Expand Down
Loading