- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation. - Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings. - Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors. - Fixed unmount lifecycle guards, promise error handling, and component edge cases.
19 lines
845 B
TypeScript
19 lines
845 B
TypeScript
import { render, screen } from '@testing-library/react';
|
|
import { describe, it, expect } from 'vitest';
|
|
import EnamadBadge from '../EnamadBadge';
|
|
|
|
describe('EnamadBadge Component', () => {
|
|
it('renders the enamad badge container with title and subtext', () => {
|
|
render(<EnamadBadge />);
|
|
expect(screen.getByText('نماد اعتماد الکترونیکی (eNamad)')).toBeInTheDocument();
|
|
expect(screen.getByText('صادر شده توسط مرکز توسعه تجارت الکترونیکی (وزارت صمت)')).toBeInTheDocument();
|
|
});
|
|
|
|
it('contains sanitized enamad link inside the badge wrapper', () => {
|
|
const { container } = render(<EnamadBadge />);
|
|
const link = container.querySelector('a');
|
|
expect(link).toBeInTheDocument();
|
|
expect(link?.getAttribute('href')).toContain('trustseal.enamad.ir');
|
|
});
|
|
});
|