Comments (7)
Thanks for starting the conversation.
Something I think is important in a revamp for RNTester is building it in such a way that is meant to support automated tests. The proposal of some sort of "indicator" for each example is that it makes it really easy for an automated test to have a consistent way to validate examples.
For example, it could enable a test helper like the following:
expect(() => {
// ... do stuff
}).toEnableIndicator();
expect(() => {
// ... do stuff
}).toHaveIndicatorCounter(4);
By having a consistent way to write and test examples then it will be much easier to ensure people have an easy time adding tests to PRs without getting stuck.
Another example of how RNTester currently isn't set up for automated tests is that we need to be able to easily reset state between runs. Right now RNTester persists navigation history which requires the few detox tests we have to click "back" to go back to the main list between each run.
from discussions-and-proposals.
Is there anybody interested in doing this work or at least starting a master task that lists all the work we could do as part of this?
from discussions-and-proposals.
✋ I would be in for helping as well.
from discussions-and-proposals.
we do something similar to that in Expo @TheSavior: https://github.com/expo/expo/tree/master/apps/test-suite
for example: https://github.com/expo/expo/blob/master/apps/test-suite/tests/Permissions.js
cc @ide
from discussions-and-proposals.
Great we are having this discussion!
Right now RNTester persists navigation history
This has been super annoying for me sometimes when RNTester would open and default to a "blank page" (yeah, there's no "not found" example). This happens when pages are moved around in between releases, where my state is usually persisted.
Something I think is important in a revamp for RNTester is building it in such a way that is meant to support automated tests. The proposal of some sort of "indicator" for each example is that it makes it really easy for an automated test to have a consistent way to validate examples.
Right now, each example is registered as a component in AppRegistry, meaning we can either render the whole app or request rendering a single page. This used to be useful for running screenshot tests on iOS (run the app with specified component, screenshot it and compare two images for inconsistencies).
I am not sure if Detox can take advantage of that, but if it could, that would certainly be useful.
from discussions-and-proposals.
I would be happy to help with RNTester. I've been wanting to actually set up a release that could in theory go to the appstore, that is the RNTester app, so devs can directly play around with it and see the capabilities, as well as serve as the example with the latest RN version, latest styles (hooks) etc.
from discussions-and-proposals.
Closing this issue as @pvinis created an issue on React Native to revamp RNTester.
from discussions-and-proposals.
Related Issues (20)
- synchronous JSI call and remote debugging HOT 5
- Alert prompt support for Android would be handy HOT 2
- WeakRef support HOT 5
- (Feature): Add SWC support
- API to detect if 'Developer Options' are enabled in Android HOT 2
- [Web] Avoid react updates on each animation frame HOT 1
- Android - Disable context menu for TextInput component HOT 1
- Merge dynamic link library HOT 6
- Import image like React js HOT 2
- how can i use `threadsafe.h` from JSI?
- Improve error messages
- WebTransport support in RN
- is there a way to specify "Debug server host & port for device" in the command line at startup. HOT 2
- [iOS][Information] App store submissions will require a privacy manifest and signature for hermes HOT 1
- Meta Quest 2D app support
- Navigation between native to react-native Android HOT 1
- Custom Background Colour for Modal Display
- Add support for Custom Rotors in React Native
- Add support of hyphenationFactor and languageIdentifier properties for <Text> in iOs 15+ HOT 1
- react-navigation@4 support in [email protected] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discussions-and-proposals.