feat(addons): finalize event addon catalog and ai styling upgrade flow
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-07 12:35:07 +01:00
parent 8cc0918881
commit d2808ffa4f
36 changed files with 1372 additions and 457 deletions

View File

@@ -219,6 +219,7 @@ vi.mock('../../api', () => ({
}));
import MobileEventControlRoomPage from '../EventControlRoomPage';
import * as api from '../../api';
describe('MobileEventControlRoomPage', () => {
it('renders compact grid actions for moderation photos', async () => {
@@ -228,4 +229,22 @@ describe('MobileEventControlRoomPage', () => {
expect(screen.getByLabelText('Hide')).toBeInTheDocument();
expect(screen.getByLabelText('Set highlight')).toBeInTheDocument();
});
it('shows AI addon upsell when AI is locked but addon is purchasable', async () => {
(api.getAddonCatalog as any).mockResolvedValueOnce([
{
key: 'ai_styling_unlock',
label: 'AI Styling Add-on',
price_id: 'paypal',
increments: {},
price: 9,
currency: 'EUR',
},
]);
render(<MobileEventControlRoomPage />);
expect(await screen.findByText('Unlock AI Magic Edit')).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Unlock AI Magic Edit/i })).toBeInTheDocument();
});
});