Closed Bug 1579655 Opened 7 months ago Closed 5 months ago

[Translate.Next] Write tests for the fluentoriginal module

Categories

(Webtools :: Pontoon, enhancement, P4)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: dinda.rachmat, Mentored)

Details

(Whiteboard: outreachyround19)

Attachments

(1 file)

We don't have any unit tests in modules/fluentoriginal.

It would be nice to add some, catching things like bug 1579632.

Mentor: adrian

Hi, I'm an Outreachy applicant and this seems like the only bug for now. Can I have a crack at it?
Thank you!

Flags: needinfo?(m)
Flags: needinfo?(adrian)

Hi Viktor, thanks for offering to contribute.

Before anything else, if you haven't done so yet, please install Pontoon and make sure it works locally. Instructions are here: https://mozilla-pontoon.readthedocs.io/en/latest/dev/setup.html

This bug is about a piece of Translate.Next, and the code lives in the frontend folder. You can read the documentation specific to this here: https://github.com/mozilla/pontoon/blob/master/frontend/README.md

The files this is about are here: https://github.com/mozilla/pontoon/tree/master/frontend/src/modules/fluentoriginal/components

They are React components that are not tested, and we would like to have some coverage there. Basically, that means adding a .test.js file for each .js file in that folder, and writing comprehensive tests for each functionality. Doing that requires to understand what each component does, so you'll have to read the code of each module.

There are many examples of tests in our code base, you can find them around by their name ending in .test.js. Here's one: https://github.com/mozilla/pontoon/blob/master/frontend/src/modules/fluenteditor/components/RichTranslationForm.test.js

To run only the frontend tests, use this command from the root of the Pontoon directory: make test-frontend.

Flags: needinfo?(adrian)

We're getting lots of requests by Outreachy participants, so we often run out of Mentored bugs. We've decided to unassign all Mentored bugs until the assignee sets up a development environment.

Please send us a screenshot of your working development environment via #pontoon on Mozilla IRC and we'll assign you a Mentored bug afterwards.

Thanks for understanding!

Assignee: viktor.stojanov90 → nobody
Status: ASSIGNED → NEW
Assignee: nobody → viktor.stojanov90
Status: NEW → ASSIGNED

Can I give it a try on this if it’s still available?

Of course! :) Assigning.

Assignee: nobody → dinda.rachmat
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Whiteboard: outreachyround19
You need to log in before you can comment on or make changes to this bug.