Add series fields to audiobooks and update related logic

Introduces 'series' and 'seriesPart' fields to the Audiobook model and database schema. Updates API routes, file organization, and path template utilities to support series metadata. Enhances chapter merging logic, improves notification backend testing, and expands test coverage for admin and API routes.
This commit is contained in:
kikootwo
2026-01-22 15:56:55 -05:00
parent dc7e557694
commit 31bca0052f
105 changed files with 10384 additions and 75 deletions
@@ -0,0 +1,43 @@
/**
* Component: Setup Wizard Layout Tests
* Documentation: documentation/setup-wizard.md
*/
// @vitest-environment jsdom
import React from 'react';
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
describe('WizardLayout', () => {
it('renders Plex steps and footer progress', async () => {
const { WizardLayout } = await import('@/app/setup/components/WizardLayout');
render(
<WizardLayout currentStep={3} totalSteps={10} backendMode="plex">
<div>Content</div>
</WizardLayout>
);
expect(screen.getByText('ReadMeABook Setup')).toBeInTheDocument();
expect(screen.getByText('Plex')).toBeInTheDocument();
expect(screen.getByText('Finalize')).toBeInTheDocument();
expect(screen.getByText('Step 3 of 10')).toBeInTheDocument();
});
it('renders Audiobookshelf steps based on auth method', async () => {
const { WizardLayout } = await import('@/app/setup/components/WizardLayout');
render(
<WizardLayout currentStep={2} totalSteps={8} backendMode="audiobookshelf" authMethod="oidc">
<div>Content</div>
</WizardLayout>
);
expect(screen.getByText('ABS')).toBeInTheDocument();
expect(screen.getByText('Auth')).toBeInTheDocument();
expect(screen.getByText('OIDC')).toBeInTheDocument();
expect(screen.queryByText('Registration')).toBeNull();
expect(screen.queryByText('Admin')).toBeNull();
});
});