feat(addons): finalize event addon catalog and ai styling upgrade flow
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user