test(post-form): realign photo specs to FilePond after U4 rework

waitForPhotoUpload waits on FilePond processing-complete; AE1/AE4 use
input.filepond--browser + the .photo-convert-status error status; V3/V4 back
to FilePond limit + non-image rejection; reauth hint -> .photo-reauth-hint;
test-form-config asserts type:filepond. Verified against a live server via a
browser smoke run (HEIC->JPEG attach, corrupt fail-closed, draft restore).
This commit is contained in:
2026-07-04 17:52:09 +02:00
parent 421c21345e
commit 27a35a1db8
5 changed files with 42 additions and 31 deletions
+8 -4
View File
@@ -93,14 +93,18 @@ async function fillEditor(page, text) {
}
/**
* Wait for the custom photo picker to finish converting + uploading photos
* (each successfully attached photo gets a `.photo-card.is-done`).
* Wait for photos to finish uploading. post-form.js converts HEIC->JPEG and
* hands files to FilePond via pond.addFile(); FilePond then uploads each, and a
* finished item reaches data-filepond-item-state="processing-complete".
*/
async function waitForPhotoUpload(page, count = 1) {
await page.waitForFunction(
(n) => document.querySelectorAll('.photo-card.is-done').length >= n,
(n) => {
const items = document.querySelectorAll('.filepond--item[data-filepond-item-state]');
return [...items].filter(el => el.getAttribute('data-filepond-item-state') === 'processing-complete').length >= n;
},
count,
{ timeout: 30_000 }
{ timeout: 40_000 }
);
}