import * as React from 'react';
import { renderHook } from '@testing-library/react-hooks';
import { Pagination } from '../Pagination';
import render from '../../utils/_tests/render';
describe('props', () => {
it('should render correctly', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with CSS props', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with currentPage', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with nextText', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with previousText', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with prepositionText', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with nextButtonProps', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with previousButtonProps', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with selectProps', () => {
const { container } = render();
expect(container.firstChild).toMatchSnapshot();
});
});
describe('overrides', () => {
it('Pagination.base should render correctly', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.Button.styles.base should render correctly', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.Select.styles.base should render correctly', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.PrepositionText.styles.base should render correctly', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('theming', () => {
it('Pagination.base should render correctly', () => {
const { container } = render(, {
theme: { Pagination: { styles: { base: { backgroundColor: 'red' } } } },
});
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.Button.styles.base should render correctly', () => {
const { container } = render(, {
theme: { Pagination: { Button: { styles: { base: { backgroundColor: 'red' } } } } },
});
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.Select.styles.base should render correctly', () => {
const { container } = render(, {
theme: { Pagination: { Select: { styles: { base: { backgroundColor: 'red' } } } } },
});
expect(container.firstChild).toMatchSnapshot();
});
it('Pagination.PrepositionText.styles.base should render correctly', () => {
const { container } = render(, {
theme: { Pagination: { PrepositionText: { styles: { base: { backgroundColor: 'red' } } } } },
});
expect(container.firstChild).toMatchSnapshot();
});
});
describe('defaultProps', () => {
it('should render correctly for className', () => {
const { container } = render(, {
theme: { Pagination: { defaultProps: { className: 'test', color: 'primary' } } },
});
expect(container.firstChild).toMatchSnapshot();
});
});