Skip to content

New UI testing framework for the web #62591

Description

@LorenzoBloedow

In order to properly evaluate if a new library can be added to package.json, please fill out this request form. It will be automatically assigned someone from our review team that will go through and vet the library.

In order to add any new production dependency, it must be approved by the App Deployer team. They will evaluate the library and decide if it's something we want to move forward with or if other alternatives should be explored.

Note: This is only for production dependencies. While we don't want people to add packages to dev-dependencies willy-nilly, we recognize that there isn't as great of a need there to secure them.
I think this is a somewhat big change, it's not just a random dev dependency, if approved, it'll change the testing workflow and maybe even the guidelines on when to write UI tests, that's why I've ignored the warning above.

Note: Text written before ", peer dependency" refers to @testing-library/dom. Since we don't plan on directly using it, I didn't think it was necessary to duplicate the template.

Name of library: @testing-library/react, (+ @testing-library/dom, peer dependency).

Details

  • Link to package: https://github.com/testing-library/react-testing-library (https://github.com/testing-library/dom-testing-library, peer dependency)
  • Problem solved by using this package: We don't have a way to test isolated UI components on the web, this leads to browser edge cases such as this only being caught by QA (Applause) on their E2E and manual tests.
    Adding support for the proposed libraries means we'd be able to iterate on PRs much faster as detecting web-specific regressions would be as easy as running the tests. As more UI tests for the web are written, It'll also probably make deploy blockers less frequent because regressions will be caught before even merging to main.
    Note: we do have "@testing-library/react-native", which is the version of the proposed library but for RN, but it's not the same thing.
  • Number of stars in GH: 19.3k (3.3k, peer dependency).
  • Number of monthly downloads: ~57.7M (~86.8M, peer dependency) (according to npmcharts.com).
  • Number of releases in the last year: 18 (9, peer dependency) (counted all releases that NPM says were published at most a year ago).
  • Level of activity in the repo: 50 open issues, 769 closed issues, 5 open PRs, 505 closed PRs (87 open issues, 522 closed issues, 29 open PRs, 681 closed PRs, peer dependency).
  • Alternatives: https://github.com/enzymejs/enzyme and E2E testing frameworks such as Playwright (E2E testing is usually much slower).
  • Are security concerns brought up and addressed in the library's repo? No (dev dependency, usually not a problem to the end user).
  • How many dependencies does this lib use that will be brought into our code? 1 dep, 13 dev dep (8 deps, 9 dev deps, peer dependency).
  • What will the effect be on the bundle size of our code? None because it's a dev dependency, which means it won't be included in the app bundle.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions