265 Commits

Author SHA1 Message Date
Michał Pierzchała fa50f7f767 v2.0.1 v2.0.1 2020-06-03 16:03:09 +02:00
dependabot-preview[bot] 50339225fb chore(deps-dev): bump @babel/core from 7.9.6 to 7.10.2 (#365)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.9.6 to 7.10.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.2/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:58:39 +02:00
dependabot-preview[bot] 8526fa4f1f chore(deps-dev): bump @babel/cli from 7.8.4 to 7.10.1 (#354)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.8.4 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-cli)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:54:52 +02:00
dependabot-preview[bot] 1d0e1a2433 chore(deps-dev): bump @babel/preset-flow from 7.9.0 to 7.10.1 (#357)
Bumps [@babel/preset-flow](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-flow) from 7.9.0 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-preset-flow)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:54:29 +02:00
dependabot-preview[bot] 2320e1ce23 chore(deps-dev): bump eslint from 7.0.0 to 7.1.0 (#347)
Bumps [eslint](https://github.com/eslint/eslint) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.0.0...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:40:35 +02:00
dependabot-preview[bot] f30a3b9713 chore(deps-dev): bump @types/react-native from 0.62.10 to 0.62.12 (#353)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.10 to 0.62.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:40:16 +02:00
dependabot-preview[bot] ac6cb62b1e chore(deps-dev): bump @babel/preset-env from 7.9.6 to 7.10.2 (#366)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.9.6 to 7.10.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.2/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:39:45 +02:00
dependabot-preview[bot] 568d9710e7 chore(deps-dev): bump release-it from 13.6.1 to 13.6.2 (#370)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.1 to 13.6.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.1...13.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:39:31 +02:00
Michał Pierzchała 7dc3ba3259 chore: use files entry instead of npmignore; reduce publish size (#371) 2020-06-03 15:38:55 +02:00
Vojtech Novak 3de2a2b35f clarify UNSAFE_ functions are not scheduled for removal (#368) 2020-06-01 18:04:31 +02:00
Drew Miller 7c6df013ff docs: update React Navigation tests to use find queries (#364)
* docs: update React Navigation tests to use find queries

* update test to be in sync with documentation
2020-05-31 11:58:31 +02:00
Sanjeev yadav 9245d9efea chore: Update github issue template file (#363) 2020-05-31 11:34:14 +02:00
Michał Pierzchała 2e4594f868 docs: clarify configuration to incluude preset react-native (#362) 2020-05-30 20:18:35 +02:00
dependabot-preview[bot] 16677ad131 chore(deps-dev): bump @babel/preset-react from 7.9.4 to 7.10.1 (#355)
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.9.4 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-preset-react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-29 10:21:47 +02:00
Michał Pierzchała 8e43ed5646 v2.0.0 v2.0.0 2020-05-28 15:09:14 +02:00
Michał Pierzchała 16790a528e v2.0.0-rc.1 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 2b14360f28 feat: wrap waitFor in (async) act to support async queries without explicit act call (#344)
* Wrapped waitFor call in act to support async waitFor/findBy

* Updated docs

* Spelling mistake

* Added short info in migration guide

* Corrected spelling

* Clarified comments

* Added async act implementation conditional on React version

* Code review changes

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Fixed prettier

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Michał Pierzchała cffd31802f v2.0.0-rc.0 2020-05-28 15:06:04 +02:00
Michał Pierzchała c86484dee4 docs: cleanup migration doc (#342) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski a47116be1c chore: rename Migration20.md to MigrationV2.md (#341) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 9e50bff6ab chore(breaking): deprecate flushMicrotasksQueue (#340)
* Deprecated flushMicrotasksQueue

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Renamed flushMicrotasksQueueInternal to flushMicroTasks

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 7c0ee5683f Spelling mistake 2020-05-28 15:06:04 +02:00
Alec Larson ad66a5489d feat: call "cleanup" automatically (#238)
* feat: add "cleanup" function

* docs: add "cleanup" section

* feat: automatically call "cleanup" after each test

...if an "afterEach" global function is defined, and process.env.RTL_SKIP_AUTO_CLEANUP is falsy.

Taken from: https://github.com/testing-library/react-testing-library/blob/14670debd45236d2c5d0a61a83dadc72af1bef7c/src/index.js

* docs: mention automatic cleanup

* add within

* fix lint

* Updated tests, added auto-cleanup test

* Added ways to prevent auto cleanup

* Small fix

* Code review changes

* Update website/docs/API.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* More changes

* Removed  afterEach(cleanup) calls in examples

* Code cleanup

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 40ed26812d chore: reorganize TS test file (#337) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 01bc0ee2b4 feat: update docs bases on cancelled prepare-2 PR (#335)
* Adapt docs changes from `prepare-2` branch

* WIP

* Removed unused `printUnsafeWarning` function

# Conflicts:
#	src/helpers/errors.js

* Code review changes
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 9fc83fec60 Feat(breaking): remove deprecated functions (#334)
* WIP

* More changes

* WIP

* Added throwRemovedFunctionError docsRef

* Fixed tests

* Typescript types cleanup

* Cleanup

* Moving some changes from `prepare-2` branch

* Moving some changes from `prepare-2` branch

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Code review changes

* More code review changes

* Code review changes

* More code review changes

* Added @deprecated messages for TS type defs

* Spelling mistake

* Reformatted index.d.ts

* Removed remaining refs to warnFn

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Michał Pierzchała 163cc8533a chore(breaking): compile project to Node 10 using @babel/preset-env (#309)
* chore: compile project to Node 8.3 using @babel/preset-env

* update snapshots

* compile to Node 10

* adjust snapshots back

* add migration docs
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 5e798bc2e3 Feat(breaking): unify wait for element signature with testing library (#327)
* Change argument to options object

* Renamed `waitForElement` to `waitFor`

* Migration guide entry

* Fixed typescript check

* Update src/helpers/a11yAPI.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* (Nearly) Empty migration doc for ver. 2.0 (#326)

* Added migration docs section

* Added to docosaurus side bar

* Updated README

* Increased async test timeout

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* feat(breaking): remove legacy `debug` export (#328)

* Removed global `debug` functions

* Removed global `debug` from docs

* Cleanup

* Added migration section

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 043f51d36c feat(breaking): remove legacy debug export (#328)
* Removed global `debug` functions

* Removed global `debug` from docs

* Cleanup

* Added migration section

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski b3e5ca386c (Nearly) Empty migration doc for ver. 2.0 (#326)
* Added migration docs section

* Added to docosaurus side bar

* Updated README

* Increased async test timeout

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 9b90d6790d fix(breaking): getByTestId should work only for native elements (#324)
* Replaced getByTestId with fixed version

* Added tests

* Fixed flow-check

* Updated docs

* Fixed lint error

* Used getByTestId in unit tests instead of queryByTestId

* Updated negative checks in tests
2020-05-28 15:06:04 +02:00
dependabot-preview[bot] b5bfb28ed7 chore(deps-dev): bump strip-ansi from 5.2.0 to 6.0.0 (#331)
Bumps [strip-ansi](https://github.com/chalk/strip-ansi) from 5.2.0 to 6.0.0.
- [Release notes](https://github.com/chalk/strip-ansi/releases)
- [Commits](https://github.com/chalk/strip-ansi/compare/v5.2.0...v6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-19 11:06:25 +02:00
dependabot-preview[bot] 90203af31c chore(deps-dev): bump @types/react from 16.9.34 to 16.9.35 (#332)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.34 to 16.9.35.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-19 11:06:08 +02:00
dependabot-preview[bot] 43b12911a5 chore(deps-dev): bump release-it from 13.6.0 to 13.6.1 (#322)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.0 to 13.6.1.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.0...13.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 11:12:01 +02:00
dependabot-preview[bot] e7e7f1bd7b chore(deps-dev): bump @babel/core from 7.9.0 to 7.9.6 (#323)
Bumps [@babel/core](https://github.com/babel/babel) from 7.9.0 to 7.9.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.9.0...v7.9.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 11:11:42 +02:00
dependabot-preview[bot] 18538bf1f6 chore(deps-dev): bump @types/react-native from 0.62.3 to 0.62.10 (#321)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.3 to 0.62.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 11:11:12 +02:00
Michał Pierzchała 6288299587 Release 1.14.0 v1.14.0 2020-05-18 09:43:34 +02:00
Maciej Jastrzebski 414f8701a5 feat: Support for @testing-library/jest-native (#310)
* Added @testing-library/jest-native to devDependencies

* Tests for jest-native matchers

* Added @testing-library/jest-native install info

* Update README.md

* Update GettingStarted.md

* feat: add `findBy*` queries (#304)

* Basic async findBy queries

* Refactored findBy queries to be built with makeFindQuery

* findBy queries for A11y selectors

* Custom findByTestId implementation that avoids current getByTestId issues

* Fixed prettier issue

* Updates Queries.md with findBy queries

* Trying to fix test timeout error appearing only on CI

* Code review changes

* Added typescript types & tests

* prettier did reformat some code arround

* Removed export of GetByAPI, QueryByAPI and FindByAPI interfaces in TS

* Reversed prettier run on typings

* Added overlapping pieces with `within` operator

* Small cleanup

* Update website/docs/Queries.md

* Moved async/await tests to the end of test methods

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* chore: bump eslint config to latest (#308)

* chore: bump eslint config to latest

* lint fix

* lint pass

* use roles directly

* Trying to fix CI build

* Added $FlowFixMe for missing flow expect extensions

* Small doc fixes

* Clarified failing toHaveProps matcher tests

* Moved lint ignore for color literals to .eslintrc

* Updated toHaveProp tests to avoid strange `Button` behavior

* Updated yarn.lock

* Update README.md

* Update website/docs/GettingStarted.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-18 09:37:59 +02:00
dependabot-preview[bot] c482f6ad07 chore(deps-dev): bump release-it from 12.6.3 to 13.6.0 (#312)
Bumps [release-it](https://github.com/release-it/release-it) from 12.6.3 to 13.6.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/12.6.3...13.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 20:05:47 +02:00
dependabot-preview[bot] 966f7957c1 chore(deps-dev): bump eslint from 6.8.0 to 7.0.0 (#315)
Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.8.0...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 19:52:51 +02:00
dependabot-preview[bot] 5297a0468a chore(deps-dev): bump @release-it/conventional-changelog (#314)
Bumps [@release-it/conventional-changelog](https://github.com/release-it/conventional-changelog) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/release-it/conventional-changelog/releases)
- [Commits](https://github.com/release-it/conventional-changelog/compare/1.1.3...1.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 19:52:35 +02:00
dependabot-preview[bot] 4269564112 chore(deps-dev): bump typescript from 3.8.3 to 3.9.2 (#313)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.3 to 3.9.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 19:47:20 +02:00
dependabot-preview[bot] 078499ec5b chore(deps-dev): bump conventional-changelog-cli from 2.0.31 to 2.0.34 (#316)
Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.0.31 to 2.0.34.
- [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases)
- [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.0.31...conventional-changelog-cli@2.0.34)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 19:46:39 +02:00
Michał Pierzchała 29ce4f2b48 chore: bump eslint config to latest (#308)
* chore: bump eslint config to latest

* lint fix

* lint pass

* use roles directly
2020-05-15 10:10:49 +02:00
Maciej Jastrzebski ab34712133 feat: add findBy* queries (#304)
* Basic async findBy queries

* Refactored findBy queries to be built with makeFindQuery

* findBy queries for A11y selectors

* Custom findByTestId implementation that avoids current getByTestId issues

* Fixed prettier issue

* Updates Queries.md with findBy queries

* Trying to fix test timeout error appearing only on CI

* Code review changes

* Added typescript types & tests

* prettier did reformat some code arround

* Removed export of GetByAPI, QueryByAPI and FindByAPI interfaces in TS

* Reversed prettier run on typings

* Added overlapping pieces with `within` operator

* Small cleanup

* Update website/docs/Queries.md

* Moved async/await tests to the end of test methods

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-15 09:52:33 +02:00
Maciej Jastrzebski 1809825313 feat: add within operator for returned instance-bound queries (#306)
* Basic within implementation and tests

* Added typescript types & tests

* Removed duplicated import in index.d.ts

* Reversed prettier run on typings

* Fixed package level exports for `within` operator

* Replaced getByTestId queries with getByA11yHint queries in unit tests for `within`

* Added `within` section to API.md

* Updated README.md regarding `within` operator

* Update website/docs/API.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-14 12:51:19 +02:00
Maciej Jastrzebski 51bd418ba7 docs: added warnings for *ByTestId queries (#305)
* Added usage notes for ByTestId queries

* Update website/docs/Queries.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Update website/docs/Queries.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-14 10:26:06 +02:00
Kenneth Kwakye-Gyamfi 58055d8998 docs: migrate to Docusaurus v2 (#299)
* Migration to Docusaurus v2.0.0

* update lock file

* add algolia search

* update GH Pages deploy

* make sidebar non-collapsible for now

* update theme colors

* ignore docusaurus-specific import aliases, remove home-container class

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-13 10:28:32 +02:00
Michał Pierzchała 16718c3d6c chore: bump React Native to 0.63 RC (#301) 2020-05-12 13:45:41 +02:00
Michał Pierzchała 298a13831b chore: upgrade Jest deps to 26 (#302) 2020-05-12 13:34:32 +02:00