der tenant admin hat eine neue, mobil unterstützende UI, login redirect funktioniert, typescript fehler wurden bereinigt. Neue Blog Posts von ChatGPT eingebaut, übersetzt von Gemini 2.5

This commit is contained in:
Codex Agent
2025-11-05 19:27:10 +01:00
parent adb93b5f9d
commit c6ac04eb15
44 changed files with 1995 additions and 1949 deletions

View File

@@ -1,6 +1,8 @@
import React from 'react';
import { describe, expect, it, vi, beforeEach } from 'vitest';
import { act, render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import type { TFunction } from 'i18next';
import { PaddleCheckout } from '../pages/WelcomeOrderSummaryPage';
const { createPaddleCheckoutMock } = vi.hoisted(() => ({
@@ -21,12 +23,13 @@ describe('PaddleCheckout', () => {
createPaddleCheckoutMock.mockResolvedValue({ checkout_url: 'https://paddle.example/checkout' });
const onSuccess = vi.fn();
const openSpy = vi.spyOn(window, 'open').mockImplementation(() => null);
const tMock = ((key: string) => key) as unknown as TFunction;
render(
<PaddleCheckout
packageId={99}
onSuccess={onSuccess}
t={(key: string) => key}
t={tMock}
/>
);
@@ -45,12 +48,13 @@ describe('PaddleCheckout', () => {
it('shows an error message on failure', async () => {
createPaddleCheckoutMock.mockRejectedValue(new Error('boom'));
const tMock = ((key: string) => key) as unknown as TFunction;
render(
<PaddleCheckout
packageId={99}
onSuccess={vi.fn()}
t={(key: string) => key}
t={tMock}
/>
);
@@ -59,7 +63,7 @@ describe('PaddleCheckout', () => {
});
await waitFor(() => {
expect(screen.getByText('summary.paddle.genericError')).toBeInTheDocument();
expect(screen.getByRole('alert')).toHaveTextContent('boom');
});
});
});