Enable foldable background presets

This commit is contained in:
Codex Agent
2026-01-24 09:02:52 +01:00
parent 7f7bebcfde
commit e8bd962a55
3 changed files with 153 additions and 40 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react';
import { describe, expect, it, vi } from 'vitest';
import { render, screen } from '@testing-library/react';
import { getEventQrInvites } from '../../api';
const fixtures = vi.hoisted(() => ({
event: {
@@ -170,4 +171,23 @@ describe('MobileQrLayoutCustomizePage', () => {
expect(screen.getByText('Text')).toBeInTheDocument();
expect(screen.getByText('Vorschau')).toBeInTheDocument();
});
it('shows background presets for foldable layouts', async () => {
const foldableInvite = {
...fixtures.invites[0],
layouts: [
{
...fixtures.invites[0].layouts[0],
orientation: 'landscape',
panel_mode: 'double-mirror',
},
],
};
vi.mocked(getEventQrInvites).mockResolvedValueOnce([foldableInvite]);
render(<MobileQrLayoutCustomizePage />);
expect(await screen.findByText('Blue Floral')).toBeInTheDocument();
});
});