react-code-dataset / wp-calypso /client /my-sites /plugins /plugin-management-v2 /test /plugin-common-actions.test.tsx
react-code-dataset / wp-calypso /client /my-sites /plugins /plugin-management-v2 /test /plugin-common-actions.test.tsx
Download wp-calypso/client/my-sites/plugins/plugin-management-v2/test/plugin-common-actions.test.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/plugins/plugin-management-v2/test/plugin-common-actions.test.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/my-sites/plugins/plugin-management-v2/test/plugin-common-actions.test.tsx
-
curl -L -o plugin-common-actions.test.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/plugins/plugin-management-v2/test/plugin-common-actions.test.tsx
752 Bytes
| /** | |
| * @jest-environment jsdom | |
| */ | |
| // @ts-nocheck - TODO: Fix TypeScript issues | |
| import { render, screen } from '@testing-library/react'; | |
| import userEvent from '@testing-library/user-event'; | |
| import React from 'react'; | |
| import PluginCommonActions from '../plugin-common/plugin-common-actions'; | |
| import { plugin } from './utils/constants'; | |
| const props = { | |
| item: plugin, | |
| renderActions: () => <div>Actions</div>, | |
| }; | |
| describe( '<PluginCommonActions>', () => { | |
| test( 'should render correctly and show the actions rendered', async () => { | |
| render( <PluginCommonActions { ...props } /> ); | |
| const actionButton = screen.getByRole( 'button' ); | |
| await userEvent.click( actionButton ); | |
| expect( screen.getByText( 'Actions' ) ).toBeInTheDocument(); | |
| } ); | |
| } ); | |