accessibility-complian…
AgentEnsure the Normandy Park website meets WCAG 2.1 AA standards and provides an inclusive experience for all users, including those…
Specialized agent for implementing comprehensive testing strategies, code quality assurance, and maintaining high standards across the H2All Web CMS project, including unit tests, integration tests, E2E tests, and quality metrics.
Specialized agent for implementing comprehensive testing strategies, code quality assurance, and maintaining high standards across the H2All Web CMS project, including unit tests, integration tests, E2E tests, and quality metrics.
tests/ ├── unit/ # Unit tests │ ├── components/ │ ├── utils/ │ └── hooks/ ├── integration/ # Integration tests │ ├── api/ │ └── services/ ├── e2e/ # End-to-end tests │ ├── flows/ │ └── pages/ ├── fixtures/ # Test data ├── mocks/ # Mock implementations └── utils/ # Test utilities
// tests/unit/components/Hero.test.tsx
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Hero from '@/components/sections/Hero';
describe('Hero Component', () => {
const defaultProps = {
title: 'Test Title',
subtitle: 'Test Subtitle',
ctaText: 'Click Me',
ctaLink: '/test'
};
it('renders title and subtitle', () => {
render(<Hero {...defaultProps} />);
expect(screen.getByText('Test Title')).toBeInTheDocument();
expect(screen.getByText('Test Subtitle')).toBeInTheDocument();
});
it('renders CTA button with correct link', () => {
render(<Hero {...defaultProps} />);
const button = screen.getByRole('link', { name: 'Click Me' });
expect(button).toHaveAttribute('href', '/test');
});
it('applies background image when provided', () => {
const { container } = render(
<Hero {...defaultProps} backgroundImage="/test-bg.jpg" />
);
const image = container.querySelector('img[src*="test-bg.jpg"]');
expect(image).toBeInTheDocument();
});
it('handles missing optional props gracefully', () => {
render(<Hero title="Only Title" />);
expect(screen.getByText('Only Title')).toBeInTheDocument();
expect(screen.queryByRole('link')).not.toBeInTheDocument();
});
});// tests/unit/hooks/useTracking.test.ts
import { renderHook, act } from '@testing-library/react';
import { useTracking } from '@/lib/monitoring/hooks/useTracking';
// Mock Application Insights
jest.mock('@/lib/monitoring/appInsights.client', () => ({
appInsights: {
trackEvent: jest.fn(),
trackMetric: jest.fn(),
trackException: jest.fn()
}
}));
describe('useTracking Hook', () => {
beforeEach(() => {
jest.clearAllMocks();
});
it('tracks events with properties', () => {
const { result } = renderHook(() => useTracking());
act(() => {
result.current.trackEvent('TestEvent', {
property1: 'value1'
});
});
expect(appInsights.trackEvent).toHaveBeenCalledWith({
name: 'TestEvent',
properties: expect.objectContaining({
property1: 'value1',
timestamp: expect.any(String)
})
});
});
it('tracks metrics correctly', () => {
const { result } = renderHook(() => useTracking());
act(() => {
result.current.trackMetric('TestMetric', 42);
});
expect(appInsights.trackMetric).toHaveBeenCalledWith({
name: 'TestMetric',
average: 42
});
});
});// tests/unit/utils/emailClaimUtils.test.ts
import {
normalizeEmail,
validateEmail,
generateClaimCode,
isExpired
} from '@/lib/utils/emailClaimUtils';
describe('Email Claim Utilities', () => {
describe('normalizeEmail', () => {
it('converts to lowercase', () => {
expect(normalizeEmail('USER@EXAMPLE.COM')).toBe('user@example.com');
});
it('removes leading/trailing whitespace', () => {
expect(normalizeEmail(' user@example.com ')).toBe('user@example.com');
});
it('handles Gmail plus addressing', () => {
expect(normalizeEmail('user+tag@gmail.com')).toBe('user@gmail.com');
});
});
describe('validateEmail', () => {
it('accepts valid emails', () => {
const validEmails = [
'user@example.com',
'user.name@example.co.uk',
'user+tag@example.com'
];
validEmails.forEach(email => {
expect(validateEmail(email)).toBe(true);
});
});
it('rejects invalid emails', () => {
const invalidEmails = [
'notanemail',
'@example.com',
'user@',
'user @example.com'
];
invalidEmails.forEach(email => {
expect(validateEmail(email)).toBe(false);
});A comprehensive Claude Code plugin with 81 commands and 12 specialized AI agents for building modern, full-stack web applications with Next.js 15, Azure, Railway, Bootstrap, and TypeScript.
Ensure the Normandy Park website meets WCAG 2.1 AA standards and provides an inclusive experience for all users, including those…
Implement secure authentication and user account management for the My Account portal, handling user registration, login, session…
Specialized agent for developing, deploying, and managing Azure serverless applications including Azure Functions, Azure Static…
Automated code review specialist for Next.js full-stack applications with platform-specific validation, ensuring code quality,…
Specialized agent for managing static and dynamic content across web applications. Handles content creation, SEO optimization,…
You are an Azure DevOps specialist with deep expertise in Azure deployment patterns, Azure Static Web Apps, Azure App Service…
Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…