GithubHelp home page GithubHelp logo

vadko / detoxtemplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wix-incubator/detoxtemplate

0.0 0.0 0.0 965 KB

License: MIT License

JavaScript 23.89% Ruby 4.69% Objective-C 23.80% Java 37.47% Starlark 10.14%

detoxtemplate's Introduction

DetoxTemplate


animated

Why this template exist?

This template was built in order to help you speed things up a little bit when opening an issue/bug. It saves you the time of setting up a completely new project just for demonstrating the problem you encountered.

How to use this template?

When opening an issue in Detox, use this template in order to create an example which reproduced your issue. These examples would help us speed up the process and solve the issue/bug you've submitted. Just fork it and feel free to add/change things to this short project which will help to reproduce the issue you encounter with!

How to run the project's Detox tests?

  1. Fork the project
  2. Clone it locally
  3. Run npm install
  4. Also run: npm install -g detox-cli

Android, in Debug mode

Building the project:

npm run build:android-debug

Launching the metro JS bundler (for auto app-reload):

npm start

Executing the tests (with the metro bundler server running in the background):

  1. Find which Android AVD you have installed (or set one up)
  2. Assuming you wish to run your tests on Pixel_4_API_30 (detox is Pixel_3A_API_29), run:
npm run test:android-debug -- -n Pixel_4_API_30

Android, in Release mode (preferred)

Building the project:

npm run build:android-release

Executing the tests (metro-budler not needed):

  1. Find which Android AVD you have installed (or set one up)
  2. Assuming you wish to run your tests on Pixel_4_API_30 (detox is Pixel_3A_API_29), run:
npm run test:android-release -- -n Pixel_4_API_30

iOS, in Debug mode

First install pods:
Install Cocoapods if you don't have it already.

npm run podInstall

Building the project:

npm run build:ios-debug

Launching the metro JS bundler (for auto app-reload):

npm start

Executing the tests (with the metro bundler server running in the background):

npm run test:ios-debug

iOS, in Release mode

Install pods if you didn't already:

npm run podInstall

Building the project:

npm run build:ios-release

Executing the tests (metro-budler not needed):

npm run test:ios-release

How to add your failing use case?

Unfortunately, there is no one-size-fits-all formula for that. However, once you're managed to properly build and run the preexisting dummy Detox test at least once on the associated platform (Android/iOS) - generally you'd have to:

  1. Edit the build dependencies scripts (build.gradle and app/build.gradle on Android, or Podfile on iOS) in order to add specific dependencies you think might be related to your issue.
  2. Either change the preexisting example screen, written in JSX - or add new ones (i.e. under Screens/). For the latter approach, be sure to also export your screens in Screens/index.js, and add a way to navigate to them in the main screen (e.g. a button in App.js).
  3. Either edit the preexisting Detox test case (see e2e/ExampleScreen.e2e.js), or add your custom one (i.e. under e2e/) -- which runs a flow where your problem gets reproduced.

Should you manage to have your issue properly reproduced: git commit and git push your changes, and share a link to your repo as a comment in your Detox issue!

detoxtemplate's People

Contributors

alon-ha avatar d4vidi avatar gabimoncha avatar github-sheriff avatar muckt avatar noomorph avatar vadko avatar

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.