Fix demo task readiness and gate event creation
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user