{"id":15433942,"url":"https://github.com/abhinaba-ghosh/react-integration-tests-example","last_synced_at":"2025-03-28T06:12:19.290Z","repository":{"id":103997141,"uuid":"374163067","full_name":"abhinaba-ghosh/react-integration-tests-example","owner":"abhinaba-ghosh","description":"Integration tests for react  and redux using react-testing-library and Cypress","archived":false,"fork":false,"pushed_at":"2021-06-08T08:29:51.000Z","size":676,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T08:34:29.966Z","etag":null,"topics":["cypress","cypress-io","integration-testing","react","react-testing-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhinaba-ghosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-05T16:34:06.000Z","updated_at":"2021-06-12T16:52:15.000Z","dependencies_parsed_at":"2023-07-10T15:33:59.763Z","dependency_job_id":null,"html_url":"https://github.com/abhinaba-ghosh/react-integration-tests-example","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"03e74b6108cadcddd3c03cbdccba995e5e36515a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinaba-ghosh%2Freact-integration-tests-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinaba-ghosh%2Freact-integration-tests-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinaba-ghosh%2Freact-integration-tests-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinaba-ghosh%2Freact-integration-tests-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhinaba-ghosh","download_url":"https://codeload.github.com/abhinaba-ghosh/react-integration-tests-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978277,"owners_count":20703678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress","cypress-io","integration-testing","react","react-testing-library"],"created_at":"2024-10-01T18:36:13.323Z","updated_at":"2025-03-28T06:12:19.271Z","avatar_url":"https://github.com/abhinaba-ghosh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Integration Test Example\n\nA comparison between [Cypress](https://www.cypress.io/) and [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) for implementing integration tests for React.\n\n## Integration tests\n\nThe integration tests has been added for the complete workflow of the TODO app where composite components interacts with each other.\n\n![integration-flow](./flow.png)\n\nSame integration test is implemented using both - Cypress has React-Testing-Library. While both the libraries are effective, i feel cypress has a little edge over RTL because of below aspects -\n\n-   Cypress executes the test in real browser context making the visualization experience better.\n-   Cypress provides fluent chained queries.\n-   Cypress retries each assertions out of the box that reduces the chance of flaky tests.\n-   [Cypress-React-Selector](https://github.com/abhinaba-ghosh/cypress-react-selector) plugin makes the job easy to fetch elements using native react properties - component, props and states.\n-   Cypress provides real-time react dev-tools support to observe react properties.\n\n## Commands\n\n-   The RTL integration tests can be found [here](./src/test/rtl)\n-   The Cypress integration test can be found [here](./src/test/cypress)\n\n```ssh\n// run RTL test\nnpm run test-rtl\n\n// run cypress test\nnpm run test-cy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinaba-ghosh%2Freact-integration-tests-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinaba-ghosh%2Freact-integration-tests-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinaba-ghosh%2Freact-integration-tests-example/lists"}