fix: add missing lucide-react icons for mobile-tab-bar
- Add Briefcase and Package icons - Update mobile-tab-bar.test.tsx to use data-testid selector - Fix ESLint errors in mobile-tab-bar.test.tsx - Test pass rate now at 97.3% (1462/1502)
This commit is contained in:
@@ -109,6 +109,8 @@ export const mockLucideReact = () => {
|
||||
LogOut: () => <span data-testid="logout-icon" />,
|
||||
Home: () => <span data-testid="home-icon" />,
|
||||
FileText: () => <span data-testid="file-text-icon" />,
|
||||
Briefcase: () => <span data-testid="briefcase-icon" />,
|
||||
Package: () => <span data-testid="package-icon" />,
|
||||
Image: () => <span data-testid="image-icon" />,
|
||||
Save: () => <span data-testid="save-icon" />,
|
||||
Trash2: () => <span data-testid="trash-icon" />,
|
||||
|
||||
@@ -9,12 +9,14 @@ jest.mock('next/navigation', () => ({
|
||||
|
||||
jest.mock('framer-motion', () => ({
|
||||
motion: {
|
||||
div: ({ children, ...props }: any) => <div {...props}>{children}</div>,
|
||||
div: ({ children, ...props }: Record<string, unknown>) => <div {...props}>{children}</div>,
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock('next/link', () => {
|
||||
return ({ children, href }: any) => <a href={href}>{children}</a>;
|
||||
const MockLink = ({ children, href }: Record<string, unknown>) => <a href={href as string}>{children}</a>;
|
||||
MockLink.displayName = 'MockLink';
|
||||
return MockLink;
|
||||
});
|
||||
|
||||
describe('MobileTabBar', () => {
|
||||
@@ -40,7 +42,7 @@ describe('MobileTabBar', () => {
|
||||
|
||||
it('should render tab icons', () => {
|
||||
render(<MobileTabBar />);
|
||||
const icons = document.querySelectorAll('svg');
|
||||
const icons = document.querySelectorAll('[data-testid]');
|
||||
expect(icons.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user