feat(journey-editor): JourneyEditor frontend — issue #753 #792

Open
marcel wants to merge 92 commits from feat/issue-753-journey-editor into feat/issue-750-lesereisen-data-model
Showing only changes of commit 65e196292e - Show all commits

View File

@@ -70,11 +70,10 @@ describe('JourneyEditor — items in position order', () => {
];
render(JourneyEditor, defaultProps({ geschichte: makeGeschichte({ items }) }));
const titles = await page.getByText(/Brief [AB]/).all();
expect(titles.length).toBeGreaterThanOrEqual(2);
// Brief A should appear before Brief B (position 0 first)
const textContent = document.body.textContent ?? '';
expect(textContent.indexOf('Brief A')).toBeLessThan(textContent.indexOf('Brief B'));
// Brief A (position 0) must appear before Brief B (position 1) in DOM order
const briefA = page.getByText('Brief A').element();
const briefB = page.getByText('Brief B').element();
expect(briefA.compareDocumentPosition(briefB) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
});
});