Add comprehensive tenant API documentation and settings help pages
- Create 6 new tenant API documentation pages: - HelpApiOverview: Authentication, scopes, rate limits, errors - HelpApiAppointments: CRUD operations for appointments - HelpApiServices: Read-only service catalog access - HelpApiResources: Staff, rooms, equipment endpoints - HelpApiCustomers: Customer management endpoints - HelpApiWebhooks: Real-time event subscriptions - Create 6 new settings help pages for granular documentation - Update HelpComprehensive with API section linking to new docs - Update platform HelpApiDocs with comprehensive endpoint coverage - Fix non-clickable /api/v1/docs/ links (now opens in new tab) - Add routes for all new help pages in App.tsx - Update FloatingHelpButton with new help page mappings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,42 @@ describe('FloatingHelpButton', () => {
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/site-builder');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/locations for /dashboard/locations', () => {
|
||||
renderWithRouter('/dashboard/locations');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/locations');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/settings/business-hours for /dashboard/settings/business-hours', () => {
|
||||
renderWithRouter('/dashboard/settings/business-hours');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/settings/business-hours');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/settings/email-templates for /dashboard/settings/email-templates', () => {
|
||||
renderWithRouter('/dashboard/settings/email-templates');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/settings/email-templates');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/settings/embed-widget for /dashboard/settings/embed-widget', () => {
|
||||
renderWithRouter('/dashboard/settings/embed-widget');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/settings/embed-widget');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/settings/staff-roles for /dashboard/settings/staff-roles', () => {
|
||||
renderWithRouter('/dashboard/settings/staff-roles');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/settings/staff-roles');
|
||||
});
|
||||
|
||||
it('links to /dashboard/help/settings/communication for /dashboard/settings/sms-calling', () => {
|
||||
renderWithRouter('/dashboard/settings/sms-calling');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/dashboard/help/settings/communication');
|
||||
});
|
||||
});
|
||||
|
||||
describe('non-dashboard routes (public/platform)', () => {
|
||||
@@ -111,6 +147,42 @@ describe('FloatingHelpButton', () => {
|
||||
expect(link).toHaveAttribute('href', '/help/settings/general');
|
||||
});
|
||||
|
||||
it('links to /help/locations for /locations', () => {
|
||||
renderWithRouter('/locations');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/locations');
|
||||
});
|
||||
|
||||
it('links to /help/settings/business-hours for /settings/business-hours', () => {
|
||||
renderWithRouter('/settings/business-hours');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/settings/business-hours');
|
||||
});
|
||||
|
||||
it('links to /help/settings/email-templates for /settings/email-templates', () => {
|
||||
renderWithRouter('/settings/email-templates');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/settings/email-templates');
|
||||
});
|
||||
|
||||
it('links to /help/settings/embed-widget for /settings/embed-widget', () => {
|
||||
renderWithRouter('/settings/embed-widget');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/settings/embed-widget');
|
||||
});
|
||||
|
||||
it('links to /help/settings/staff-roles for /settings/staff-roles', () => {
|
||||
renderWithRouter('/settings/staff-roles');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/settings/staff-roles');
|
||||
});
|
||||
|
||||
it('links to /help/settings/communication for /settings/sms-calling', () => {
|
||||
renderWithRouter('/settings/sms-calling');
|
||||
const link = screen.getByRole('link');
|
||||
expect(link).toHaveAttribute('href', '/help/settings/communication');
|
||||
});
|
||||
|
||||
it('returns null on /help pages', () => {
|
||||
const { container } = renderWithRouter('/help/dashboard');
|
||||
expect(container.firstChild).toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user