Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Improve tests for MultipleFileUpload

Offen
#11,854 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
react, typescript
Bereich
frontend, testing

Rechercherichtung

Beginne mit der MultipleFileUpload-Komponente und ihren bestehenden Snapshot-Tests. Überprüfe, wie das Verhalten onFileDrop der Drittanbieterbibliothek derzeit dargestellt wird, und füge anschließend eine gezielte Abdeckung für den zurückgegebenen File-Pfad sowie den Unterschied zum Upload einzelner Dateien hinzu. Erledigt ist die Aufgabe, wenn das relevante Verhalten getestet wird und nicht nur durch Snapshots abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

PF Team Stale

Describe the enhancement or change
Consumer reported the following:

Not really an issue, but I am puzzled by the slight behaviour change of the MultipleFileUpload component.
The onFileDrop callback sends an array of File objects, with properties like path. But it seems this propetrty
changed a little bit:
In PF5 I was getting for example: path: "image.png"
In PF6 I am getting: path: "./image.png"
That's not much of a change and is almost the same in a filesystem. But as I was using this info for the path of the object I am sending into Object Storage, it messed up my app a little bit.
Again, not an issue, I will handle it in my code, but I was wondering if there was a specific reason for this behaviour change? Which does not happen for single file upload btw, it's the plain name of the file only.

We use a third-party library for this piece of the component - we did bump from 14.2.3 to 14.3.5 between versions, so it's possible they changed the file name handling between versions. I don't see a big difference in our code. I do see that we have mostly snapshot tests for this component and do not test the third-party library functionality at all in our tests, so we wouldn't have caught this when we bumped the dependency. We could stand to improve our tests for this component in my opinion.

Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
No - not blocking.


Jira Issue: PF-1855

Vorherrschende Sprache
TypeScript
Sterne
862
Forks
392
Ø Merge
4 T. 8 Std.
Gemergte PRs (30 T.)
9

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus patternfly/patternfly-react

Alle Issues in patternfly/patternfly-react

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.