feat: Add more base component to UI
This commit is contained in:
116 files changed
+10379
-3473
No files matched your search
@@ -2,14 +2,14 @@ import userEvent from '@testing-library/user-event';
|
||||
import React from 'react';
|
||||
|
||||
import { Container } from './Container';
|
||||
import { render, screen } from '../../../test-utils';
|
||||
import { render, screen } from '../../test-utils';
|
||||
|
||||
describe('components/generic/Container', () => {
|
||||
describe('components/Container', () => {
|
||||
it('handles onPress event', async () => {
|
||||
const user = userEvent.setup();
|
||||
const handlePress = jest.fn();
|
||||
render(<Container onPress={handlePress}>Content</Container>);
|
||||
|
||||
|
||||
const container = screen.getByText('Content');
|
||||
await user.click(container);
|
||||
expect(handlePress).toHaveBeenCalledTimes(1);
|
||||
@@ -25,4 +25,4 @@ describe('components/generic/Container', () => {
|
||||
expect(container).toHaveClass('cursor-pointer');
|
||||
expect(container).toHaveClass('active:opacity-80');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user