- Add‑on Checkout auf Transactions + Transaction‑ID speichern: app/Services/Addons/EventAddonCheckoutService.php
- Paket/Marketing Checkout auf Transactions: app/Services/Paddle/PaddleCheckoutService.php
- Gift‑Voucher Checkout: Customer anlegen/finden + Transactions: app/Services/GiftVouchers/
GiftVoucherCheckoutService.php
- Tests aktualisiert: tests/Feature/Tenant/EventAddonCheckoutTest.php, tests/Unit/PaddleCheckoutServiceTest.php,
tests/Unit/GiftVoucherCheckoutServiceTest.php
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { describe, expect, it, vi } from 'vitest';
|
|
import { render } from '@testing-library/react';
|
|
|
|
vi.mock('@tamagui/core', () => ({
|
|
useTheme: () => ({
|
|
primary: { val: '#2563eb' },
|
|
borderColor: { val: '#e5e7eb' },
|
|
surface: { val: '#ffffff' },
|
|
}),
|
|
}));
|
|
|
|
vi.mock('@tamagui/stacks', () => ({
|
|
YStack: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
|
XStack: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
|
}));
|
|
|
|
vi.mock('@tamagui/text', () => ({
|
|
SizableText: ({ children }: { children: React.ReactNode }) => <span>{children}</span>,
|
|
}));
|
|
|
|
vi.mock('@tamagui/react-native-web-lite', () => ({
|
|
Pressable: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
|
}));
|
|
|
|
import { LegalConsentSheet } from '../LegalConsentSheet';
|
|
|
|
describe('LegalConsentSheet', () => {
|
|
it('renders the required consent checkboxes when open', () => {
|
|
const { getAllByRole } = render(
|
|
<LegalConsentSheet
|
|
open
|
|
onClose={vi.fn()}
|
|
onConfirm={vi.fn()}
|
|
t={(key, fallback) => fallback ?? key}
|
|
/>
|
|
);
|
|
|
|
expect(getAllByRole('checkbox')).toHaveLength(2);
|
|
});
|
|
});
|