https://github.com/danecando/jsm-detox
Demo app for JSMarathon presentation: React Native E2E Testing with Detox
https://github.com/danecando/jsm-detox
detox e2e-tests jsmarathon pizza react-native
Last synced: 3 months ago
JSON representation
Demo app for JSMarathon presentation: React Native E2E Testing with Detox
- Host: GitHub
- URL: https://github.com/danecando/jsm-detox
- Owner: danecando
- Created: 2021-05-02T10:41:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-19T17:07:09.000Z (over 4 years ago)
- Last Synced: 2025-03-09T03:06:24.609Z (7 months ago)
- Topics: detox, e2e-tests, jsmarathon, pizza, react-native
- Language: JavaScript
- Homepage: https://www.youtube.com/watch?v=Vm085szsz_M
- Size: 1.03 MB
- Stars: 22
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Native E2E Testing with Detox
Learn how to setup your local or CI environment to run E2E tests on iOS & Android emulators with Detox. Write E2E tests for a demo application covering best practices and gotchas along the way.
[This document](https://www.notion.so/danecando/React-Native-E2E-Testing-with-Detox-210239315470489095d0b4e51cfc5768) contains links to documentation and resources related to each part of the walk through during this presentation.
## Table of contents
- [Setup](#setup)
- [Running](#running)
- [Branches](#branches)
- [App Overview](#app-overview)
- [E2E Test Cases](#e2e-test-cases)
- [Resources](#resources)## Setup
```bash
git clone https://github.com/danecando/JSM-Detox-Testing.git
cd JSMarathon
yarn
```### Install pods for iOS development
```bash
cd ios && pod install && cd ..
```## Running
### Android
```
yarn android
```### iOS
```
yarn ios
```## Branches
- `main` - Base demo app without detox or e2e tests
- `setup` - Demo app with detox setup and configured for iOS + Android with initial working test
- `tests` - Demo app with working e2e tests## App Overview
We love pizza at This Dot! The demo is an app for our fictional pizza restaurant.
There are two tabs: **Menu and Orders**
The menu tab is a list of the available pizzas to order. You can also build your own pizza using the first button at the top of the screen.

### Build your own
On this screen you can add and remove toppings from your pizza, select the size, see the total price, and submit your order.

### Menu item options
After selecting an item from the menu list you will be taken to a screen that lets you pick the size and see the final price before submitting your order.

### Orders
Orders comes with one previously delivered order populated by default. Any pizzas you create or order will be added to your order screen.

## E2E Test Cases
We want to write e2e tests to cover these user flows
- [ ] User can navigate to orders to see previous orders
- [ ] User can pick an item from the menu, select a size and options, and place an order
- [ ] User can create their own pizza and order it## Resources
- [https://github.com/wix/Detox](https://github.com/wix/Detox)
- [https://medium.com/wix-engineering/detox-writing-stable-test-suites-372c9d537184](https://medium.com/wix-engineering/detox-writing-stable-test-suites-372c9d537184)