Skip to content
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

Create textarea input #2187

Merged
merged 4 commits into from
Feb 22, 2021
Merged

Create textarea input #2187

merged 4 commits into from
Feb 22, 2021

Conversation

axbarsan
Copy link
Contributor

Towards giantswarm/giantswarm#11004 and towards the grommet migration

This PR includes a new textarea input. There were no components that I could add it to. There was one old usage of textarea in the keypair creation success modal, which was also not displayed correctly, and I replaced it with the FileBlock component.

Preview

With label

image

With error

image

With info message

image

With help message

image

Disabled

image

Keypair creation success modal - BEFORE

image

Keypair creation success modal - AFTER

image

@axbarsan axbarsan added the kind/dev-change Changing a development operation label Feb 22, 2021
@axbarsan axbarsan self-assigned this Feb 22, 2021
@axbarsan axbarsan requested a review from a team February 22, 2021 12:48
Comment on lines -239 to -255

const kubeconfigContent = getByTitle(/kubeconfig/i).textContent;
const copyButton = getByText(/^copy$/i);
fireEvent.click(copyButton);
expect(setClipboardContentMockFn).toHaveBeenCalledWith(kubeconfigContent);
// @ts-ignore
useCopyToClipboard.mockReturnValueOnce([true, setClipboardContentMockFn]);

act(() => {
jest.runAllTimers();
});

const copiedSuccessLabel = getByTitle(/content copied to clipboard/i);
expect(copiedSuccessLabel).toBeInTheDocument();

// @ts-ignore
useCopyToClipboard.mockClear();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the part that was testing copying to clipboard, that's already tested for the FileBlock component

Copy link
Contributor

@oponder oponder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@axbarsan axbarsan merged commit 196c5a9 into master Feb 22, 2021
@axbarsan axbarsan deleted the create-textarea-input branch February 22, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/dev-change Changing a development operation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants