Add Site Builder help docs and fix FloatingHelpButton paths

- Add HelpSiteBuilder.tsx with comprehensive documentation for the
  drag-and-drop page editor (components, publishing, settings)
- Fix FloatingHelpButton to use /dashboard/help/* paths on tenant sites
- Update HelpComprehensive and HelpAutomations to rename plugins to automations
- Add site-crawler utility with cross-subdomain redirect detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-16 22:42:46 -05:00
parent 725a3c5d84
commit 94e37a2522
8 changed files with 913 additions and 189 deletions

View File

@@ -19,68 +19,127 @@ describe('FloatingHelpButton', () => {
);
};
it('renders help link on dashboard', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toBeInTheDocument();
describe('tenant dashboard routes (prefixed with /dashboard)', () => {
it('renders help link on tenant dashboard', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toBeInTheDocument();
});
it('links to /dashboard/help/dashboard for /dashboard', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/dashboard');
});
it('links to /dashboard/help/scheduler for /dashboard/scheduler', () => {
renderWithRouter('/dashboard/scheduler');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/scheduler');
});
it('links to /dashboard/help/services for /dashboard/services', () => {
renderWithRouter('/dashboard/services');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/services');
});
it('links to /dashboard/help/resources for /dashboard/resources', () => {
renderWithRouter('/dashboard/resources');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/resources');
});
it('links to /dashboard/help/settings/general for /dashboard/settings/general', () => {
renderWithRouter('/dashboard/settings/general');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/settings/general');
});
it('links to /dashboard/help/customers for /dashboard/customers/123', () => {
renderWithRouter('/dashboard/customers/123');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/customers');
});
it('returns null on /dashboard/help pages', () => {
const { container } = renderWithRouter('/dashboard/help/dashboard');
expect(container.firstChild).toBeNull();
});
it('links to /dashboard/help for unknown dashboard routes', () => {
renderWithRouter('/dashboard/unknown-route');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help');
});
it('links to /dashboard/help/site-builder for /dashboard/site-editor', () => {
renderWithRouter('/dashboard/site-editor');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/site-builder');
});
it('links to /dashboard/help/site-builder for /dashboard/gallery', () => {
renderWithRouter('/dashboard/gallery');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/dashboard/help/site-builder');
});
});
it('links to correct help page for dashboard', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/dashboard');
describe('non-dashboard routes (public/platform)', () => {
it('links to /help/scheduler for /scheduler', () => {
renderWithRouter('/scheduler');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/scheduler');
});
it('links to /help/services for /services', () => {
renderWithRouter('/services');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/services');
});
it('links to /help/resources for /resources', () => {
renderWithRouter('/resources');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/resources');
});
it('links to /help/settings/general for /settings/general', () => {
renderWithRouter('/settings/general');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/settings/general');
});
it('returns null on /help pages', () => {
const { container } = renderWithRouter('/help/dashboard');
expect(container.firstChild).toBeNull();
});
it('links to /help for unknown routes', () => {
renderWithRouter('/unknown-route');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help');
});
it('handles dynamic routes by matching prefix', () => {
renderWithRouter('/customers/123');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/customers');
});
});
it('links to correct help page for scheduler', () => {
renderWithRouter('/scheduler');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/scheduler');
});
describe('accessibility', () => {
it('has aria-label', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('aria-label', 'Help');
});
it('links to correct help page for services', () => {
renderWithRouter('/services');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/services');
});
it('links to correct help page for resources', () => {
renderWithRouter('/resources');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/resources');
});
it('links to correct help page for settings', () => {
renderWithRouter('/settings/general');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/settings/general');
});
it('returns null on help pages', () => {
const { container } = renderWithRouter('/help/dashboard');
expect(container.firstChild).toBeNull();
});
it('has aria-label', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('aria-label', 'Help');
});
it('has title attribute', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('title', 'Help');
});
it('links to default help for unknown routes', () => {
renderWithRouter('/unknown-route');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help');
});
it('handles dynamic routes by matching prefix', () => {
renderWithRouter('/customers/123');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', '/help/customers');
it('has title attribute', () => {
renderWithRouter('/dashboard');
const link = screen.getByRole('link');
expect(link).toHaveAttribute('title', 'Help');
});
});
});