49 Commits

Author SHA1 Message Date
Kacper Wiszczuk 88f55e216d fix: remove gatekeeper badge (#267) 2020-03-18 17:45:14 +01:00
Daniel Idaszak 131a903427 chore: Typo fixed in readme (#194) 2019-06-19 12:08:36 +02:00
Michał Pierzchała fb8a6fc7e2 chore(docs): improve examples to use better APIs 2019-06-11 13:32:26 +02:00
Michał Pierzchała fd6cb4951e docs: install react-test-renderer typings (#181) 2019-05-28 22:52:40 +02:00
Asday 66a4f5f347 Fixed a 404 in README.md. (#159)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

The readme's "Rally Health" link is a 404.  It appears to attempt to link to a careers page.  I skillfully sniffed out a suitable careers page by scrolling down on the 404 page and clicking "careers".

### Test plan

0. Scroll to the bottom of `README.md`;
0. Middle click on "Rally Health";
0. Bask (optional).
2019-04-23 09:10:18 +02:00
Kacper Wiszczuk 7a1c264bb0 Docs: Remove shallow API from docs (#154) 2019-04-14 17:39:11 +02:00
Kacper Wiszczuk 34eb921e21 Fix small logo in README.md (#153)
Fix small logo.
2019-04-14 15:14:19 +02:00
Kacper Wiszczuk b94fe03990 docs: Owl as RNTL logo (#152)
* imp: owl as RNTL logo

* Undo formatter mess

* Change descriptions
2019-04-14 15:04:16 +02:00
Michał Pierzchała 3e73d6f32d chore: remove excess badges that have GH support 2019-03-11 16:52:57 +01:00
Michał Pierzchała b3abf50a10 docs: add callstack badge and note 2019-03-06 19:47:41 +01:00
Michał Pierzchała f988c3c229 chore: simple -> lightweight in README 2019-03-04 17:00:03 +01:00
David Calhoun f6c895bac5 docs: Update links (#125) 2019-03-03 08:32:00 +01:00
Jan Hesters f35d4f5dac docs: Add note for cleanup being unnecessary (#115) 2019-02-14 19:39:36 +01:00
Michał Pierzchała 28dcc6ff4a Add note about Rally Health 2019-01-24 16:46:17 +01:00
Josh Justice 5145a708db docs: Clarify RNTL is tested to work with Jest (#98)
As discussed in https://github.com/callstack/react-native-testing-library/issues/96, I found that I could get RNTL working with Jest but not with Mocha. I haven't _confirmed_ it doesn't work with Mocha, but I think it would be helpful for users (like me) who don't have a strong preference which runner to use, to know that Jest could be a good first choice.
2018-12-21 08:10:19 +01:00
Michał Pierzchała b82b4f5a6a Revert "Fix link for api docs in read me file" (#95)
* Revert "docs: Rename api.md to API.md (#94)"

This reverts commit 53b5366393.

* Revert "docs: Fix link for api docs in read me file (#93)"

This reverts commit 86271e6ffa.
2018-12-15 12:36:59 +01:00
Alina Mihai 86271e6ffa docs: Fix link for api docs in read me file (#93)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

<!-- What existing problem does the pull request solve? Can you solve the issue with a different approach? -->

### Test plan

<!-- List the steps with which we can test this change. Provide screenshots if this changes anything visual. -->
2018-12-15 12:31:28 +01:00
Brooks Becton ad61c409e9 docs: add website built with Docusaurus (#74)
* Run docusaurus init

* Add api.md and remove initial files

* Run docusaurus init

* Add api.md and remove initial files

* Add callstack info and remove extra scripts

* Commeent out  extra features on home page and Add link to example

* Re Arrange Docs Folder

* add some adjustments

* fix lint

* fix lint
2018-12-11 19:58:37 +01:00
Michał Pierzchała 3f2fc16ec2 docs: separate API from main README.md (#70)
### Summary

Separate API docs from main README.md
Relates to #26.

### Test plan

|README.md|api.md|
|--|--|
|<img width="980" alt="screenshot 2018-11-23 at 12 21 42" src="https://user-images.githubusercontent.com/5106466/48941096-740d0a80-ef1a-11e8-8c92-110f1b47826d.png">|<img width="984" alt="screenshot 2018-11-23 at 12 22 05" src="https://user-images.githubusercontent.com/5106466/48941097-740d0a80-ef1a-11e8-872b-a8dfb7814e68.png">|
2018-11-23 15:03:22 +01:00
Michał Pierzchała a052349ce7 docs: getAllByName -> getAllByType in example (#67)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

Get rid of all `getAllByName` mentions in examples.
2018-11-19 22:28:06 +01:00
Michał Pierzchała e407ff07ae feat: deprecate getByName helpers (#66) 2018-11-19 15:16:33 +01:00
Michał Pierzchała 909916e84c feat: add debug to render helpers for easier console debugging (#65)
* feat: add debug to render helpers for easier console debugging

* bring back toJSON to docs

* revert unnecessary change

* update TS

* remove cyclic dependency of debug <-> render
2018-11-19 13:51:38 +01:00
Michał Pierzchała fa198c4037 feat: add getByType helper (#64)
* feat: add getByType helper

* add docs
2018-11-19 13:44:51 +01:00
Michał Pierzchała 235942bee3 fix(breaking): correct faulty implementation of finding by name (#62)
* fix(breaking): correct faulty implementation of finding by name

* chore: update docs

* refactor: code review
2018-11-17 19:13:44 +01:00
Shawn Axsom d3146aaf11 docs: Documentation update for The Problem section of the README, clarifying Enzyme capabilities while highlighting more react-native-testing-library benefits (#43) 2018-10-25 11:45:53 +02:00
Ben Styles 174a5d0f76 docs: Remove reference to instance in readme (#42) 2018-10-20 19:48:27 +02:00
Michał Pierzchała 6fbbe2cdf5 feat: make debug.deep more usable (#40)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

Make `debug.deep` more usable by allowing it to print arbitrary JSON (and actually any) files. This proves handy when we want to debug async component which we want to snapshot after async operations:

```jsx
const { toJSON, getByName } = render(
  <Button onPress={jest.fn} text="Press me" />
);
fireEvent.press(getByName('TouchableOpacity'));
await flushMicrotasksQueue();

debug.deep(toJSON());
```

### Test plan

added one
2018-10-18 09:13:47 +02:00
Michał Pierzchała 45f45bf1b4 feat: move pretty-format from peer do deps (#39)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

We could also make it an optional dependency and inline-require it inside debug (the only place we use it) but for now I decided to make it a regular dependency, because that's what it is, no point in making users install it directly.

### Test plan

green CI
2018-10-17 22:12:18 +02:00
Michał Pierzchała 05db7bcaac feat: add debug.deep and debug.shallow (#37)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

Adds API proposed by https://github.com/callstack/react-native-testing-library/pull/33#issuecomment-430302079.
Also component output is now highlighted:

<img width="259" alt="screenshot 2018-10-16 at 19 33 25" src="https://user-images.githubusercontent.com/5106466/47035614-c10efb80-d17a-11e8-99ac-00f648880008.png">


### Test plan

Added tests for `debug`.
2018-10-16 21:45:56 +02:00
Michał Pierzchała 03e2c4b0f2 fix: use actual react-native instead of homegrown mocks (#36)
<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

This actually uncovered some bugs, like lack of `onDoublePress` (lol XD) and enabled us to have better snapshots for deep rendering.

### Test plan

no new tests
2018-10-16 18:51:01 +02:00
Michał Pierzchała 07d3be1c51 feat: add toJSON to render; cleanup shallow (#35)
* feat: add toJSON to render; cleanup shallow

* Remove empty dependencies entry

* revert shallow import

* add docs

* add TS typings
2018-10-16 18:00:54 +02:00
Simen Bekkhus 6097c8f64c chore: fix typos in readme (#22) 2018-10-11 00:10:06 +02:00
Kacper Wiszczuk 480dd28cbc feat: Add Typescript types to waitForElement (#21)
Fix types for Flow too
2018-10-10 21:45:32 +02:00
Michał Pierzchała d5219d2e93 feat: add waitForElement (#20)
* feat: add waitForElement

* add docs

* update docs
2018-10-10 21:06:06 +02:00
Michał Pierzchała 0ce1d7ec47 update greenkeeper badge 2018-10-07 19:02:48 +02:00
Kacper Wiszczuk 4f0501e6b5 fix: Flow types (#16)
- [x] - Add flow to tests
- [x] - Fix flow typings
- [x] - Update documentation
2018-10-07 14:50:05 +02:00
greenkeeper[bot] d2e00f5264 Update dependencies to enable Greenkeeper 🌴 (#14)
Let’s get started with automated dependency management for react-native-testing-library 💪

🔒 Greenkeeper has found a `yarn.lock` file in this repository. Greenkeeper supports lockfile updates for public packages. If you use private packages in your repository, please use [greenkeeper-lockfile](https://github.com/greenkeeperio/greenkeeper-lockfile) to make sure these can get updated as well.

This pull request **updates all your dependencies to their latest version**. Having them all up to date really is the best starting point for keeping up with new releases. Greenkeeper will look out for further dependency updates and make sure to handle them in isolation and in real-time, but only after **you merge this pull request**.

**Important: Greenkeeper will only start watching this repository’s dependency updates after you merge this initial pull request**.





---
<details>
<summary>🏷 How to check the status of this repository</summary>

Greenkeeper adds a badge to your README which indicates the status of this repository.

This is what your badge looks like right now 👉  ![Greenkeeper badge](https://badges.greenkeeper.io/callstack/react-native-testing-library.svg)
</details>
<details>
<summary>🙈 How to ignore certain dependencies</summary>

You may have good reasons for not wanting to update to a certain dependency right now. In this case, you can [change the dependency’s version string in the `package.json` file back to whatever you prefer](https://github.com/callstack/react-native-testing-library/edit/greenkeeper/initial/package.json).

To make sure Greenkeeper doesn’t nag you again on the next update, add a `greenkeeper.ignore` field to your `package.json`, containing a list of dependencies you don’t want to update.

```js
// package.json
{
  …
  "greenkeeper": {
    "ignore": [
      "package-names",
      "you-want-me-to-ignore"
    ]
  }
}
```
</details>
<details>
<summary>👩‍💻 How to update this pull request</summary>

```bash
  # Change into your repository’s directory
  git fetch --all
  git checkout greenkeeper/initial
  npm install-test
  # Adapt your code until everything works again
  git commit -m 'chore: adapt code to updated dependencies'
  git push https://github.com/callstack/react-native-testing-library.git greenkeeper/initial
```
</details>
<details>
<summary> How do dependency updates work with Greenkeeper?</summary>

After you merge this pull request, **Greenkeeper will create a new branch whenever a  dependency is updated**, with the new version applied. The branch creation should trigger your testing services and check whether your code still works with the new dependency version. Depending on the the results of these tests Greenkeeper will try to open meaningful and helpful pull requests and issues, so your dependencies remain working and up-to-date.

```diff
-  "underscore": "^1.6.0"
+  "underscore": "^1.7.0"
```

The above example shows an in-range update. `1.7.0` is included in the old `^1.6.0` range, because of the [caret `^` character ](https://docs.npmjs.com/misc/semver#ranges).
When the test services report success Greenkeeper will silently delete the branch again, because no action needs to be taken – everything is fine.

However, should the tests fail, Greenkeeper will create an issue to inform you about the problem immediately.

This way, you’ll never be surprised by a dependency breaking your code. As long as everything still works, Greenkeeper will stay out of your way, and as soon as something goes wrong, you’ll be the first to know.

```diff
-  "lodash": "^3.0.0"
+  "lodash": "^4.0.0"
```

In this example, the new version `4.0.0` is _not_ included in the old `^3.0.0` range.
For version updates like these – let’s call them “out of range” updates – you’ll receive a pull request.

This means that **you no longer need to check for new versions manually** – Greenkeeper will keep you up to date automatically.

These pull requests not only serve as reminders to update: If you have solid tests and good coverage, and the pull requests passes those tests, you can very likely just merge it and release a new version of your software straight away :shipit:

To get a better idea of which ranges apply to which releases, check out the extremely useful [semver calculator](https://semver.npmjs.com/) provided by npm.
</details>
<details>
<summary>FAQ and help</summary>

There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>


---

Good luck with your project and see you soon 

Your [Greenkeeper](https://greenkeeper.io) bot 🌴
2018-10-07 11:40:29 +02:00
Michał Pierzchała 495811bd08 feat: add query API (#13)
* feat: add query API

* use plural for API

* return empty array from queryAll

* fix wording in readme

* move mass exports to get/query files
2018-10-07 10:59:27 +02:00
Kacper Wiszczuk d66255d482 feat: fireEvent API (#11)
Implementation of fireEvent API.

Fixes #7
2018-10-07 08:23:21 +02:00
Michał Pierzchała 08c5725984 docs: move tagline up 2018-10-06 19:40:29 +02:00
Michał Pierzchała 062a43d9e8 docs: add badges 2018-10-06 19:39:44 +02:00
Michał Pierzchała 129bda8aee fix typo 2018-10-04 23:44:59 +02:00
Michał Pierzchała 61623ddee8 simplify example 2018-10-04 09:21:42 +02:00
Dawid 2c0b6b93ff fix: wrong package name in "installation" section (#5) 2018-10-03 21:33:29 +02:00
Michał Pierzchała 2a9f1f74ec add pretty-format to peerDeps in readme 2018-10-03 21:10:19 +02:00
Michał Pierzchała 5a16e8a6e7 update readme with new render API and example 2018-10-03 20:21:46 +02:00
Michał Pierzchała 520355a645 change shallow output to be more future proof 2018-10-03 19:27:32 +02:00
Michał Pierzchała c4a0dd7763 update readme 2018-10-03 19:15:36 +02:00
Michał Pierzchała ac77a55068 inital commit 2018-10-01 18:15:56 +02:00