...
Github site: https://github.com/nasa/earthdata-search
Git Stash Bitbucket site: https://git.earthdata.nasa.gov/projects/EDSC
...
Info | ||
---|---|---|
| ||
At the end of every sprint, in order to make patching a release easier, please tag the main branch at the latest commit.
Also remember to update the Release Version on bamboo for all of the projects These tags are referred to as releases in Github and can be viewed here: https://github.com/nasa/earthdata-search/tags |
...
Tests should describe how the system responds to certain inputs. They should not simply duplicate the code under test.
Ruby makes it very easy to stub methods and specify return values. Often, this can lead to fragile tests which don't perform any useful validation. If a test stubs every call made by a method, for instance, the test doesn't verify that the method actually works; simultaneously, the test will break any time the method changes.
Mocks couple tests and code, and should be used very sparingly. Valid reasons to use mocks include:
When in doubt, it's better to not mock.
The test suite should provide developers with rapid feedback regarding the correctness of their code. To accomplish this, they should execute quickly. Keep performance in mind when writing tests. The following guidelines will help minimize execution time:
If performance becomes a problem, we may segregate tests into "fast" and "full" runs, but ideally we will avoid this.
If you see a failure and you suspect it was caused by some intermittent problem, e.g. a timeout that is too short or an external service being down, it is not enough to simply re-run the tests. Fix the problem. If a problem truly cannot be fixed, document why, catch the specific error that cannot be fixed, and throw a more meaningful one.
...
The test suite should provide developers with rapid feedback regarding the correctness of their code. To accomplish this, they should execute quickly. Keep performance in mind when writing tests. The following guidelines will help minimize execution time:
If performance becomes a problem, we may segregate tests into "fast" and "full" runs, but ideally we will avoid this.
If you see a failure and you suspect it was caused by some intermittent problem, e.g. a timeout that is too short or an external service being down, it is not enough to simply re-run the tests. Fix the problem. If a problem truly cannot be fixed, document why, catch the specific error that cannot be fixed, and throw a more meaningful one.
React testing library best practices:
Role
such as buttons, checkboxes etc. If there are multiple elements of the same role on a component use a secondary filter to ensure you select the correct ones for your assertions example: getByRole('button, {name: 'button-name'}await
statements for userEvent methods, userEvent is already wrapped in an awaitscreen
to select elements on the virtual DOMwaitFor
block...
Minimize the overall depth of HTML to decrease page size, increase readability, and improve rendering speed.
See This example and description from Stack Overflow. Use Rails helpers to dynamically generate highlight dynamic HTML with widely varying elements and structure. Use Rails partials to generate more static content.
Earthdata Search uses SCSS to generate its CSS. It follows the guidelines for scalable CSS outlined by SMACSS, with key items reproduced in this document. The CI build checks CSS style using CSS Lint. Developers are strongly encouraged to read the CSS Lint rules.
...