Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Eli White 20a3bb52ce Convert component snapshot tests to a reusable helper
Summary:
These tests need to be consistent with every test so a helper makes more sense.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18500439

fbshipit-source-id: de535156d370102bad88e556ad3d2a0d5443e4e2
2019-11-20 18:09:30 -08:00
Rick Hanlon ac62274e56 Use generated view config for ActivityIndicatorView
Summary: This diff moves ActivityIndicatorView to the generated view config

Reviewed By: shergin

Differential Revision: D15392561

fbshipit-source-id: 67a2fa0dbbb884af9e9c02b9062d3a610a023240
2019-05-24 09:21:27 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Brandon Carroll de12b98cd5 WIP: add snapshots for mocked and unmocked components (#24554)
Summary:
Per a conversation with TheSavior, in #24538, this adds snapshot tests for all components whose mocks will be addressed in that PR. Shallow and deep snapshots are included.

[General] [Added] - Snapshots
Pull Request resolved: https://github.com/facebook/react-native/pull/24554

Differential Revision: D15062197

Pulled By: cpojer

fbshipit-source-id: 70ddbaa5e6d1d2c0fd1130ab04c458d9c49d0ee8
2019-04-24 06:52:20 -07:00
Rick Hanlon c5b80062ea Fix ActivityIndicator snapshot test, add toMatchShallowSnapshot
Summary:
This diff adds a custom matcher which will wrap a given component and shallow render it, snapshotting the result with the formatting users will see when they do the same.

I also update the ActivityIndicator test to use this new strategy, and add an additional check that the displayName is set.

For context see:
- https://github.com/facebook/react-native/pull/21950
- https://github.com/rajivshah3/rn-broken-snapshot/blob/broken-example/__tests__/App.spec.js#L3
- https://github.com/facebook/react-native/issues/21937

Reviewed By: TheSavior

Differential Revision: D13326689

fbshipit-source-id: 8ed2302a8aad12962fa2498a46d2502ccfb5c737
2018-12-05 17:23:42 -08:00
Michael Blanchard 53da585832 Fix: Add displayName to ActivityIndicator (#22417)
Summary:
Similar to #21950, this adds displayName to `ActivityIndicator`, so it displays the correct component name in snapshots instead of `Component`.

Fixes #21937 (a little bit more than it was already fixed).
Pull Request resolved: https://github.com/facebook/react-native/pull/22417

Differential Revision: D13205376

Pulled By: TheSavior

fbshipit-source-id: 21e71d4980d159a1f33d32d83346b48257ec21d4
2018-11-26 16:49:58 -08:00