import { render, screen } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';

vi.mock('@/Layouts/Web/WebLayout', () => ({ default: ({ children }) => <>{children}</> }));

import Customers from '@/Pages/Web/Customers';

describe('Web/Customers page', () => {
    it('renders without crashing', () => {
        render(<Customers />);
    });

    it('sets the correct page title', () => {
        render(<Customers />);
        expect(document.title).toBe('Customers — Upepo POS');
    });

    it('displays customers heading', () => {
        render(<Customers />);
        expect(screen.getByText(/customers/i)).toBeInTheDocument();
    });
});
