feat: Refactor layouts in www
This commit is contained in:
66 files changed
+1805
-352
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
import { PageRoot } from './PageRoot';
|
||||
|
||||
describe('PageRoot', () => {
|
||||
it('renders children correctly', () => {
|
||||
render(
|
||||
<PageRoot>
|
||||
<div data-testid="child">Test Content</div>
|
||||
</PageRoot>
|
||||
);
|
||||
expect(screen.getByTestId('child')).toBeInTheDocument();
|
||||
expect(screen.getByText('Test Content')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('applies custom className', () => {
|
||||
const { container } = render(
|
||||
<PageRoot className="custom-class">
|
||||
<div>Content</div>
|
||||
</PageRoot>
|
||||
);
|
||||
expect(container.firstChild).toHaveClass('custom-class');
|
||||
});
|
||||
|
||||
it('has base technical classes', () => {
|
||||
const { container } = render(
|
||||
<PageRoot>
|
||||
<div>Content</div>
|
||||
</PageRoot>
|
||||
);
|
||||
expect(container.firstChild).toHaveClass('w-full');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user