Conversation
Collaborator
marcbon
commented
Mar 2, 2026
- bug form allowed media
- table_net_gross: scope to first .wallet-table to avoid matching the new expired attribution table (7+5=12 headers) - manual payment: reset count in beforeEach to avoid cross-test accumulation
fix: align wallet E2E tests to current UI structure
Fills in the previously empty BUGFORM_UPLOAD_TXT_VIDEO_IMAGE key (shown in BugForm when autoApprove=1 and minimumMedia > 1) in all four locales, and translates the video/image validation error messages that were left in English in the it/es/fr files. - en: BUGFORM_UPLOAD_TXT_VIDEO_IMAGE filled in - it: BUGFORM_UPLOAD_TXT_VIDEO_IMAGE + error messages in Italian - es: BUGFORM_UPLOAD_TXT_VIDEO_IMAGE + error messages in Spanish - fr: BUGFORM_UPLOAD_TXT_VIDEO_IMAGE + error messages in French
The store was previously created inline inside <Provider store={setupStore()}>,
which created a new store instance on every App render. Moving it to module
scope makes the reference stable.
In non-production environments (development + test), the store is also
exposed on window.__store to allow E2E tests to dispatch Redux actions
directly without going through the UI upload flow.
The uploadFiles helper was failing because: 1. It called setInputFiles before the BugForm was mounted (campaign data not yet in Redux), causing uploadMedia to bail out at the `if (!campaign.data) return` guard. 2. React 17's synthetic event delegation does not fire on events dispatched via CDP (setInputFiles) or page.evaluate, so react-dropzone's onAccepted callback was never triggered regardless of the approach (setInputFiles, DragEvent, native input override). Fix: wait for "Upload files" to be visible (guarantees the form is mounted and campaign data is loaded), then inject the media list directly into the Redux store via window.__store.dispatch instead of simulating the upload UI. This is reliable because: - The FileDropzone and FileList useEffect hooks react to mediaList changes via useSelector, so Formik's media field is updated automatically. - The yup has-video / has-image validators close over mediaList from Redux, so they receive the correct data when the form is submitted.
- Replace redundant <Trans> with t() in the standard message branch:
removes the tOptions prop (redundant with count), aligns defaultValue
with the actual EN translation
- Fix French singular form for BUGFORM_UPLOAD_TXT and
BUGFORM_UPLOAD_ERROR_MINIMUMFILES ("médias" → "média"; plural _plural
variant with "médias" is kept for count > 1)
feat(UN-2378): media type constraints for autoApprove campaigns in BugForm
iacopolea
approved these changes
Mar 2, 2026
sinatragianpaolo
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.