160 Commits

Author SHA1 Message Date
Michał Pierzchała e85aa187e1 chore: upgrade pretty-format to v28 to match Jest deps (#1019)
* v11.0.0-rc.0

* chore: upgrade pretty-format to v28 to match Jest deps
2022-07-21 09:31:29 +02:00
Michał Pierzchała 6a65ed3294 v11.0.0-rc.0 2022-07-20 14:46:15 +02:00
MattAgn 74318854b9 Organise a11y queries by predicate (#977)
* refactor: make Options generic type optionnal in queries

* refactor: extract byLabelText queries and its tests

* refactor: extract byA11yHint queries and its tests

* refactor: extract byRole queries and its tests

* refactor: extract byA11yState queries and its tests

* refactor: extract byA11yValue queries and its tests

* refactor: extract byA11yStates queries and its tests

* refactor: harmonize component declaration in queries testsx

* refactor: simplify error helpers in queries tests

* refactor: make error helpers more explicit

* chore: remove now unused makeA11yQueries

* refactor: rename AccessibilityStateKeyQueryParam to AccessibilityStateKeys

* refactor: rename param in a11yStates

* refactor: simplify matchObject

* refactor: fix namings in labelText

* refactor: fix namings in a11yHint

* refactor: fix queryAll namings'

* refactor: fix some namings in a11yState

* refactor: fix some namings in role

* refactor: fix some namings in a11yValue

* refactor: extract matchStringValue

* refactor: extract matchObject

* refactor: extract matchArrayValue

* test: add tests for the matchers

* refactor: simplify matchArrayValue to make it more explicit

* refactor: reorder imports and object keys

* refactor: update types

* refactor: small tweaks

* refactor: tweaks

* refactor: clarify matcher naming

* refactor: add missing aliases

* chore: fix ci timeout

* chore: revert jest timeout increase

* chore: revert timeout increase

* chore: fix ci tests

* chore: re-enable disabled tests

* chore: reduce jest paralelizaiton

* chore: ci tweaks

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2022-07-20 11:37:04 +02:00
Maciej Jastrzebski 91d2b83d1f chore: update deps @types for react/react-native (#1013) 2022-07-19 10:44:53 +02:00
Maciej Jastrzebski 77bf93c5ad chore: update Jest to 28 (#1008)
* chore: update jest

* refactor: pass useFakeTimer config in tests

* refactor: remove unused code

* fix jest config unable to discover babel due to rootDir change

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2022-07-19 09:53:38 +02:00
Maciej Jastrzebski bdd8f75864 chore: update react-native to 0.69.1 (#1010)
* chore: update react-native deps

* refactor: split fake timer test to make it pass
2022-07-18 18:14:58 +02:00
Maciej Jastrzebski 63f7731a17 chore: update react-native to 0.68.2 (#1009)
* chore: update react-native to 0.68.2

* chore: update workflow node version to 14

* chore: fix flow

* chote: increase jest timeout
2022-07-18 17:28:37 +02:00
Michał Pierzchała 8e0a1083a2 v10.1.1 2022-06-24 15:42:48 +02:00
Michał Pierzchała 51cd8d0b49 v10.1.0 2022-06-24 13:17:37 +02:00
Michał Pierzchała 1e67026d95 v10.0.1 2022-06-24 12:37:00 +02:00
Michał Pierzchała 710855eb46 v10.0.0 2022-06-23 11:15:15 +02:00
Michał Pierzchała 480a38ec72 v9.2.0 2022-04-26 15:01:52 +02:00
Carlos Diaz-Padron 221486b9fc fix: include jsx/tsx in build, fix out dir in package.json (#957) 2022-04-26 14:57:50 +02:00
Augustin Le Fèvre 1360b73295 feat(breaking): migrate Flow to TS; remove some deprecated functions and aliases (#881)
* Port types to TS

* Fix CI commands

* Fix typo in yml file

* Address PR comments

* Remove aliased accessibility queries

* Add flow types

* Update build to support TS

* Clean up removed aliased queries

* Move @babel/plugin-transform-flow-strip-types to test config

* Address PR comments

* Delete flow tests

* Retrigger pipeline

* Update src/helpers/timers.ts

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2022-03-25 16:54:30 +01:00
Michał Pierzchała 2199c1db1b v9.1.0 2022-03-25 10:28:10 +01:00
Michał Pierzchała 8ab46b444b v9.0.0 2021-12-06 09:51:13 +01:00
dependabot[bot] 990ca8b5a4 chore(deps-dev): bump @callstack/eslint-config from 10.2.0 to 11.0.0 (#847)
Bumps [@callstack/eslint-config](https://github.com/callstack/eslint-config-callstack) from 10.2.0 to 11.0.0.
- [Release notes](https://github.com/callstack/eslint-config-callstack/releases)
- [Commits](https://github.com/callstack/eslint-config-callstack/compare/v10.2.0...v11.0.0)

---
updated-dependencies:
- dependency-name: "@callstack/eslint-config"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-23 22:42:22 +01:00
dependabot[bot] 272b748ede chore(deps-dev): bump @types/react-native from 0.65.7 to 0.66.5 (#863)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.65.7 to 0.66.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

---
updated-dependencies:
- dependency-name: "@types/react-native"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-23 16:50:52 +01:00
Michał Pierzchała 5178f5e569 v9.0.0-alpha.0 2021-11-23 16:36:42 +01:00
Michał Pierzchała 0ede61780b v8.0.0 2021-10-15 21:18:54 +02:00
dependabot[bot] 9bd2f2f293 chore(deps-dev): bump @testing-library/jest-native from 3.4.3 to 4.0.2 (#842)
Bumps [@testing-library/jest-native](https://github.com/testing-library/jest-native) from 3.4.3 to 4.0.2.
- [Release notes](https://github.com/testing-library/jest-native/releases)
- [Changelog](https://github.com/testing-library/jest-native/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-native/compare/v3.4.3...v4.0.2)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-native"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-15 21:03:23 +02:00
Michał Pierzchała 7726a6d074 chore: upgrade Jest and RN to latest (#837)
* chore: upgrade Jest and RN to latest

* chore: update test timeout
2021-10-15 20:36:26 +02:00
Michał Pierzchała 0c37fb8bff v8.0.0-rc.1 2021-06-28 11:43:57 +02:00
dependabot[bot] c1ef023689 chore(deps-dev): bump @types/react-native from 0.63.50 to 0.64.4 (#724)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.63.50 to 0.64.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 13:55:21 +02:00
Michał Pierzchała 8021f098b6 v8.0.0-rc.0 2021-03-02 15:08:28 +01:00
Michał Pierzchała 62ccd08e13 feat: expose custom Jest preset restoring global Promise (#695)
* feat: expose custom Jest preset restoring global Promise

* typo
2021-03-02 14:24:56 +01:00
Mike Duminy 2ccec3c3a3 fix(breaking): use real timers internally to fix awaiting with fake timers (#568)
* capture global timers, use them in waitFor, tests+

* use real timers in flushMicroTasks

* test to show changes with modern timer mocks

* use enum-like object for timer modes

* fix tests

* remove default timer mode, add flow types
export other timer helpers, adjust tests and docs

* base waitFor on RTL implementation

* [jest] Capture and restore global promise

* [waitFor] Simulate intervals when using fake timers

* [tests] Fix waitForElementToBeRemoved

* cleanups; use more specific global

* rename globals to match others

Co-authored-by: Michael James Duminy <michael-james.duminy@klarna.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2021-03-02 13:49:30 +01:00
Michał Pierzchała 716ac8f9ca v7.2.0 2021-03-02 12:59:24 +01:00
dependabot-preview[bot] a1afddbbb4 chore(deps-dev): bump flow-bin from 0.137.0 to 0.141.0 (#647)
Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.137.0 to 0.141.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-07 11:07:39 +01:00
Michał d6265d9dcb chore: bump React Native to 0.64 RC (#626)
* chore: bump React Native to 0.64 RC

* Snapshot update

* Bumped node version to 12 on CI

* Removed removed supress_comment syntax from config

* codemod types-first

* Prettied files after codemod

* Added flow types to API returns

* don't return null from fireEvent handlers

* return ReactTestInstance instead of any

* fix render returning any

* less anys

* less anys

* simplify call type

* simplify

* add Flow to missing files, type debug better

Co-authored-by: Michał Parkitny <michal.parkitny@callstack.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-12-09 17:49:39 +01:00
dependabot-preview[bot] 9a9abde40c chore(deps-dev): bump @types/react-test-renderer from 16.9.3 to 17.0.0 (#616)
Bumps [@types/react-test-renderer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-test-renderer) from 16.9.3 to 17.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-test-renderer)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-09 12:06:10 +01:00
dependabot-preview[bot] b8a9ba85ce chore(deps-dev): bump @release-it/conventional-changelog (#588)
Bumps [@release-it/conventional-changelog](https://github.com/release-it/conventional-changelog) from 1.1.4 to 2.0.0.
- [Release notes](https://github.com/release-it/conventional-changelog/releases)
- [Commits](https://github.com/release-it/conventional-changelog/compare/1.1.4...2.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-12-09 12:05:51 +01:00
Michał Pierzchała b9f9ab754e v7.1.0 2020-10-21 12:36:44 +02:00
Michał Klekowski 78fb456b8a feat: export container from render (#567)
* feat: export root test instance from render

* test: add tests for root test instance returned from render function

* docs: add description about root test instance returned from render function

* feat: change root export to container and wrap component in View if no wrapper defined

* docs: update description about container test instance returned from render function

* test: update tests for root test instance returned from render function

* test: clean up comments in tests

* feat: add react-native as peerDependency, clean up lint ignore for lines that was importing react-native

* revert adding default wrapper

* rework tests

* reword docs

* add testID checks

* add comments

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-10-21 12:26:01 +02:00
dependabot-preview[bot] 1b5569b9b6 chore(deps-dev): bump release-it from 13.7.0 to 14.0.3 (#565)
Bumps [release-it](https://github.com/release-it/release-it) from 13.7.0 to 14.0.3.
- [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.7.0...14.0.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-12 17:52:15 +02:00
dependabot-preview[bot] e489100fc1 chore(deps-dev): bump @testing-library/jest-native from 3.3.0 to 3.4.3
Bumps [@testing-library/jest-native](https://github.com/testing-library/jest-native) from 3.3.0 to 3.4.3.
- [Release notes](https://github.com/testing-library/jest-native/releases)
- [Changelog](https://github.com/testing-library/jest-native/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-native/compare/v3.3.0...v3.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 07:38:28 +00:00
dependabot-preview[bot] fc94b3b8a2 chore(deps-dev): bump typescript from 3.9.7 to 4.0.2 (#523)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.0.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-09-01 19:37:09 +02:00
Michał Pierzchała 0aa9465856 v7.0.2 2020-08-16 21:28:12 +02:00
Michał Pierzchała 292e883611 v7.0.1 2020-07-31 10:35:11 +02:00
Michał Pierzchała cc5ef6c626 v7.0.0 2020-07-30 16:18:25 +02:00
Michał Pierzchała 3c0a2ecf02 chore(breaking): rename to @testing-library/react-native (#463) 2020-07-30 16:13:15 +02:00
dependabot-preview[bot] 7feab6c6da chore(deps-dev): bump @testing-library/jest-native from 3.1.0 to 3.3.0 (#466)
Bumps [@testing-library/jest-native](https://github.com/testing-library/jest-native) from 3.1.0 to 3.3.0.
- [Release notes](https://github.com/testing-library/jest-native/releases)
- [Changelog](https://github.com/testing-library/jest-native/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-native/compare/v3.1.0...v3.3.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-07-30 13:06:13 +02:00
Michał Pierzchała 9a13eccdad v2.2.0 2020-07-30 13:00:26 +02:00
Michał Pierzchała d84f8f8e2c Release 2.1.1 2020-07-16 15:07:40 +02:00
dependabot-preview[bot] f6af344b48 chore(deps-dev): bump @types/react-native from 0.62.18 to 0.63.0 (#435)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.18 to 0.63.0.
- [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-07-14 12:09:12 +02:00
Michał Pierzchała edc6712a5a v2.1.0 2020-06-10 08:24:39 +02:00
Michał Pierzchała fa50f7f767 v2.0.1 2020-06-03 16:03:09 +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
Michał Pierzchała 8e43ed5646 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