Files
playbook/antigravity-awesome-skills/apps/web-app/src/pages/__tests__/Plugins.test.tsx
T
2026-07-29 07:59:17 +00:00

32 lines
1.5 KiB
TypeScript

import { screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { Plugins } from '../Plugins';
import { renderWithRouter } from '../../utils/testUtils';
describe('Plugins', () => {
it('renders the specialized plugin catalog and sets metadata', () => {
renderWithRouter(<Plugins />, { route: '/plugins', path: '/plugins', useProvider: false });
expect(screen.getByRole('heading', { name: /Choose the focused AAS plugin/i })).toBeInTheDocument();
expect(screen.getByText('AAS Web App Builder')).toBeInTheDocument();
expect(screen.getByText('AAS Security Engineer')).toBeInTheDocument();
expect(screen.getByText('AAS Marketing, SEO & Growth')).toBeInTheDocument();
expect(screen.getByText(/distributions of the full skill library/i)).toBeInTheDocument();
expect(screen.queryByText(/1,550\+/i)).not.toBeInTheDocument();
expect(screen.getByRole('link', { name: /Install one skill with GitHub CLI/i })).toHaveAttribute(
'href',
expect.stringContaining('docs/users/getting-started.md'),
);
expect(screen.getByText(/Plugins, bundles, and workflows serve different decisions/i)).toBeInTheDocument();
expect(screen.getByRole('link', { name: '@frontend-developer' })).toHaveAttribute(
'href',
'/skill/frontend-developer/',
);
expect(document.title).toContain('AAS Specialized Plugins');
expect(document.querySelector('meta[name="description"]')).toHaveAttribute(
'content',
expect.stringContaining('specialized plugin'),
);
});
});