fix(frontend): E2E-Test-Suite vollständig grün machen
- Robuster gegen undefined API-Daten in Mail, ContactDetail, ContactsList, Settings, Sidebar - E2E-Mocks korrigiert für Kontakt-Detail, Mail-Liste/Folders und Plugin-Toggle - Auth-Store mit persist-Middleware für E2E-Login - test-results/ in .gitignore aufgenommen Playwright E2E: 34/34 passed
This commit is contained in:
@@ -70,6 +70,7 @@ export function ContactsListPage() {
|
||||
const [saveViewDialogOpen, setSaveViewDialogOpen] = useState(false);
|
||||
const [selectedContactIds, setSelectedContactIds] = useState<Set<string>>(new Set());
|
||||
const openWindow = useWindowStore((s) => s.openWindow);
|
||||
const closeWindow = useWindowStore((s) => s.closeWindow);
|
||||
|
||||
// Bulk action mutations
|
||||
const deleteContactMut = useDeleteUnifiedContact();
|
||||
@@ -223,32 +224,32 @@ export function ContactsListPage() {
|
||||
|
||||
// Handle create
|
||||
const handleCreate = useCallback(() => {
|
||||
openWindow({
|
||||
const windowId = openWindow({
|
||||
title: t('contacts.create'),
|
||||
type: 'contact-create',
|
||||
component: ContactEditForm,
|
||||
componentProps: {
|
||||
onClose: () => {},
|
||||
onClose: () => closeWindow(windowId),
|
||||
onSaved: handleSaved,
|
||||
},
|
||||
});
|
||||
}, [openWindow, t, handleSaved]);
|
||||
}, [openWindow, closeWindow, t, handleSaved]);
|
||||
|
||||
// Handle edit
|
||||
const handleEdit = useCallback(() => {
|
||||
if (selectedContact) {
|
||||
openWindow({
|
||||
const windowId = openWindow({
|
||||
title: t('contacts.edit'),
|
||||
type: 'contact-edit',
|
||||
component: ContactEditForm,
|
||||
componentProps: {
|
||||
contact: selectedContact,
|
||||
onClose: () => {},
|
||||
onClose: () => closeWindow(windowId),
|
||||
onSaved: handleSaved,
|
||||
},
|
||||
});
|
||||
}
|
||||
}, [selectedContact, openWindow, t, handleSaved]);
|
||||
}, [selectedContact, openWindow, closeWindow, t, handleSaved]);
|
||||
|
||||
// Handle delete (from detail)
|
||||
const handleDeleted = useCallback(() => {
|
||||
@@ -747,6 +748,7 @@ export function ContactsListPage() {
|
||||
loading={loadingDetail}
|
||||
onEdit={handleEdit}
|
||||
onDeleted={handleDeleted}
|
||||
dataTestId="contact-detail-mobile"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user