Giter VIP home page Giter VIP logo

Comments (7)

TheSavior avatar TheSavior commented on May 20, 2024 3

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.

cpojer avatar cpojer commented on May 20, 2024 2

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.

lucasbento avatar lucasbento commented on May 20, 2024 1

✋ I would be in for helping as well.

from discussions-and-proposals.

brentvatne avatar brentvatne commented on May 20, 2024

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.

grabbou avatar grabbou commented on May 20, 2024

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.

pvinis avatar pvinis commented on May 20, 2024

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.

cpojer avatar cpojer commented on May 20, 2024

Closing this issue as @pvinis created an issue on React Native to revamp RNTester.

from discussions-and-proposals.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.