Fix demo task readiness and gate event creation
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-05 11:26:07 +01:00
parent 7262617897
commit 04c399aeb6
14 changed files with 318 additions and 36 deletions

View File

@@ -255,6 +255,41 @@ describe('MobileEventsPage', () => {
});
it('shows the create button when an active package has remaining events', async () => {
vi.mocked(api.getTenantPackagesOverview).mockResolvedValueOnce({
packages: [
{
id: 2,
package_id: 2,
package_name: 'Reseller',
package_type: 'reseller',
included_package_slug: 'standard',
active: true,
used_events: 1,
remaining_events: 2,
price: 240,
currency: 'EUR',
purchased_at: null,
expires_at: null,
package_limits: { max_events_per_year: 5 },
},
],
activePackage: {
id: 2,
package_id: 2,
package_name: 'Reseller',
package_type: 'reseller',
included_package_slug: 'standard',
active: true,
used_events: 1,
remaining_events: 2,
price: 240,
currency: 'EUR',
purchased_at: null,
expires_at: null,
package_limits: { max_events_per_year: 5 },
},
});
render(<MobileEventsPage />);
expect(await screen.findByText('New event')).toBeInTheDocument();