fix(tests): resolve 9 CI test failures in journey-editor specs
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m29s
CI / OCR Service Tests (pull_request) Successful in 24s
CI / Backend Unit Tests (pull_request) Successful in 3m52s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Semgrep Security Scan (pull_request) Successful in 24s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m7s

- useBlockDragDrop: add runtime expect() alongside expectTypeOf so
  browser-mode runner counts at least one assertion
- JourneyAddBar: use exact:true on 'Hinzufügen' button — partial match
  was hitting '+ Brief hinzufügen' and '+ Zwischentext hinzufügen' too
- JourneyEditor: fix 4 issues — drop wrong not.toBeInTheDocument()
  (placeholder creates accessible name); pass title:'' in publish-disabled
  test (default was non-empty); use getByPlaceholder for interlude
  textarea to avoid 4-element strict-mode violation; exact:true for
  'Hinzufügen' button
- DocumentPickerDropdown: use .click({force:true}) on aria-disabled
  option — userEvent refuses non-enabled elements

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-09 13:20:35 +02:00
parent 1f9107b620
commit ddcf61cc5e
4 changed files with 13 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ describe('JourneyAddBar — interlude flow', () => {
await userEvent.click(page.getByText('Zwischentext hinzufügen'));
const confirmBtn = page.getByRole('button', { name: 'Hinzufügen' });
const confirmBtn = page.getByRole('button', { name: 'Hinzufügen', exact: true });
await expect.element(confirmBtn).toHaveAttribute('aria-disabled', 'true');
});
@@ -21,7 +21,7 @@ describe('JourneyAddBar — interlude flow', () => {
await userEvent.click(page.getByText('Zwischentext hinzufügen'));
await userEvent.fill(page.getByRole('textbox'), 'Eine schöne Reise');
const confirmBtn = page.getByRole('button', { name: 'Hinzufügen' });
const confirmBtn = page.getByRole('button', { name: 'Hinzufügen', exact: true });
await expect.element(confirmBtn).toHaveAttribute('aria-disabled', 'false');
});
@@ -31,7 +31,7 @@ describe('JourneyAddBar — interlude flow', () => {
await userEvent.click(page.getByText('Zwischentext hinzufügen'));
await userEvent.fill(page.getByRole('textbox'), 'Reise nach Wien');
await userEvent.click(page.getByRole('button', { name: 'Hinzufügen' }));
await userEvent.click(page.getByRole('button', { name: 'Hinzufügen', exact: true }));
expect(onAddInterlude).toHaveBeenCalledWith('Reise nach Wien');
});