- Consolidated multi-line arguments into single lines where appropriate in `useAuth`. - Improved spacing and readability in data processing across components (`ProfileSettingsForm`, `PasswordChangeForm`, `SessionCard`). - Applied consistent table and markdown formatting in design system docs (e.g., `README.md`, `08-ai-guidelines.md`, `00-quick-start.md`). - Updated code snippets to ensure adherence to Prettier rules and streamlined JSX structures.
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
/**
|
|
* Tests for Password Settings Page
|
|
* Smoke tests for page rendering
|
|
*/
|
|
|
|
import { render, screen } from '@testing-library/react';
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
import PasswordSettingsPage from '@/app/(authenticated)/settings/password/page';
|
|
|
|
describe('PasswordSettingsPage', () => {
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: { retry: false },
|
|
mutations: { retry: false },
|
|
},
|
|
});
|
|
|
|
const renderWithProvider = (component: React.ReactElement) => {
|
|
return render(<QueryClientProvider client={queryClient}>{component}</QueryClientProvider>);
|
|
};
|
|
|
|
it('renders without crashing', () => {
|
|
renderWithProvider(<PasswordSettingsPage />);
|
|
expect(screen.getByText('Password Settings')).toBeInTheDocument();
|
|
});
|
|
|
|
it('renders heading', () => {
|
|
renderWithProvider(<PasswordSettingsPage />);
|
|
expect(screen.getByRole('heading', { name: /password settings/i })).toBeInTheDocument();
|
|
});
|
|
|
|
it('shows description text', () => {
|
|
renderWithProvider(<PasswordSettingsPage />);
|
|
expect(screen.getByText(/change your password/i)).toBeInTheDocument();
|
|
});
|
|
});
|