Skip to content

Commit 6a5b528

Browse files
DanielMSchmidtrotemmiz
authored andcommitted
Add docusaurus for website (wix#491)
* add docusaurus for website * add docusaurus to the CI build * Add documentation for 6.x * only deploy documentation on master branch
1 parent f546a21 commit 6a5b528

File tree

78 files changed

+3775
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3775
-35
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ matrix:
5050
script:
5151
- ./scripts/demo-projects.ios.sh
5252

53+
# Website
54+
- language: node_js
55+
env:
56+
- NAME='Website - master'
57+
node_js: 8
58+
script:
59+
- git config --global user.email "[email protected]"
60+
- git config --global user.name "Daniel Schmidt"
61+
- echo "machine github.com login $GIT_USER password $GIT_TOKEN" > ~/.netrc
62+
- cd website && npm install && GIT_USER=$GIT_USER CURRENT_BRANCH=docusaurus npm run publish-gh-pages
63+
branches:
64+
only:
65+
- master
66+
5367
branches:
5468
only:
5569
- master

docs/APIRef.ActionsOnElement.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Actions on Element
1+
---
2+
id: APIRef.ActionsOnElement
3+
title: Actions on Element
4+
---
25

36
Detox uses **Matchers** to find UI `elements` in your app, **Actions** to emulate user interaction with those `elements` and **Expectations** to verify values on those `elements`.
47

docs/APIRef.Artifacts.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Artifacts
1+
---
2+
id: APIRef.Artifacts
3+
title: Artifacts
4+
---
25

36
Artifacts currently include only logs from the app process.
47

docs/APIRef.Configuration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Configuration Options
1+
---
2+
id: APIRef.Configuration
3+
title: Configuration Options
4+
---
25

36
## Configuring package.json
47
### Device Configuration

docs/APIRef.DetoxCLI.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Detox Command Line Tools (detox-cli)
1+
---
2+
id: APIRef.DetoxCLI
3+
title: Detox Command Line Tools (detox-cli)
4+
---
25

36
`detox-cli` lets you operate Detox from command line.
47

docs/APIRef.DetoxObjectAPI.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# The `detox` Object
1+
---
2+
id: APIRef.DetoxObjectAPI
3+
title: The `detox` Object
4+
---
25

36
`detox` is globally available in every test file, though currently it is only used in the setup/init file.
47

docs/APIRef.DeviceObjectAPI.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# The `device` Object
1+
---
2+
id: APIRef.DeviceObjectAPI
3+
title: The `device` Object
4+
---
25

36
`device` is globally available in every test file, it enables control over the current attached device (currently only simulators are supported).
47

docs/APIRef.Expect.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Expect
1+
---
2+
id: APIRef.Expect
3+
title: Expect
4+
---
25

36
Detox uses **Matchers** to find UI `elements` in your app, **Actions** to emulate user interaction with those `elements` and **Expectations** to verify values on those `elements`.
47

docs/APIRef.Matchers.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Matchers
1+
---
2+
id: APIRef.Matchers
3+
title: Matchers
4+
---
25

36
Detox uses **Matchers** to find UI `elements` in your app, **Actions** to emulate user interaction with those `elements` and **Expectations** to verify values on those `elements`.
47

docs/APIRef.MockingOpenFromURL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## Mocking Open from URL (Deep Links)
1+
---
2+
id: APIRef.MockingOpenFromURL
3+
title: Mocking Open from URL (Deep Links)
4+
---
25

36
You can mock opening the app from URL to test your app's deep link handling mechanism.
47

docs/APIRef.MockingUserNotifications.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
2-
# Mocking User Notifications
1+
---
2+
id: APIRef.MockingUserNotifications
3+
title: Mocking User Notifications
4+
---
35

46
Detox supports mocking user notifications for iOS apps.
57

docs/APIRef.TestLifecycle.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Test Lifecycle
1+
---
2+
id: APIRef.TestLifecycle
3+
title: Test Lifecycle
4+
---
25

36
Detox is test runner independent, and we encourge you to choose your own test runner, but for the sake of demonstration we will use `mocha`'s syntax.
47

docs/APIRef.waitFor.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Manual Synchronization Using `waitFor`
1+
---
2+
id: APIRef.waitFor
3+
title: Manual Synchronization Using `waitFor`
4+
---
25

36
In most cases, tests should be automatically synchronized with the app. When synchronization doesn't work, you have a fail-safe by using `waitFor`. This API polls using the given expectation continuously until the expectation is met. Use manual synchronization with `waitFor` only as a **last resort**. Polling for expectations isn't exactly a best practice.
47

docs/Guide.Contributing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Contributing to Detox
1+
---
2+
id: Guide.Contributing
3+
title: Contributing
4+
---
25

36
## Prerequisites
47

docs/Guide.DebuggingInXcode.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Debugging Apps in Xcode During a Test
1+
---
2+
id: Guide.DebuggingInXcode
3+
title: Debugging Apps in Xcode During a Test
4+
---
25

36
> Advanced users might need to natively debug their app inside Xcode during a Detox test. This is mostly useful for invesigating weird crahses or when contributing to Detox itself.
47

docs/Guide.DevelopingWhileWritingTests.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Developing Your App While Writing Tests
1+
---
2+
id: Guide.DevelopingWhileWritingTests
3+
title: Developing Your App While Writing Tests
4+
---
25

36
> If your app requires active development, such as adding testID fields for tests, this is a good workflow. It allows you to work both on your app and your tests at the same time.
47

docs/Guide.Jest.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Jest as Test Runner
1+
---
2+
id: Guide.Jest
3+
title: Jest
4+
---
25

36
## Usage
47

docs/Guide.Migration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Migration Guide
1+
---
2+
id: Guide.Migration
3+
title: Migration Guide
4+
---
25

36
We are improving detox API as we go along, sometimes these changes require us to break the API in order for it to make more sense and. These migration guides refer to breaking changes.
47

docs/Guide.Mocking.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Advanced Mocking With Detox
1+
---
2+
id: Guide.Mocking
3+
title: Mocking
4+
---
25

36
Mocking is an important part of testing. You may want to alter some behavior of your app during test and replace it with a mock. Here are some example reasons why this could be useful:
47

docs/Guide.RunningLocally.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Running Tests Locally on Your Machine
1+
---
2+
id: Guide.RunningLocally
3+
title: Running Locally
4+
sidebar_label: Running Tests Locally
5+
---
26

37
> If your app is ready and does not require any active development, you can write your tests using this workflow and run them locally on your machine. This is convenient for developing your test suite without actively developing your app.
48

docs/Guide.RunningOnCI.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Running Tests on CI (Travis or Bitrise)
1+
---
2+
id: Guide.RunningOnCI
3+
title: Running On CI
4+
---
25

36
> When your test suite is finally ready, it should be set up to run automatically on your CI server on every git push. This will alert you if new changes to the app break existing functionality.
47

docs/Introduction.Android.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Detox for Android
1+
---
2+
id: Introduction.Android
3+
title: Detox for Android
4+
---
25

36
## Setup
47
Detox 7 was updated to support Android gradle plugin 3.0.0. This is a breaking change that makes it impossible to support previous Android gradle plugin versions.

docs/Introduction.GettingStarted.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Getting Started
1+
---
2+
id: Introduction.GettingStarted
3+
title: Getting Started
4+
---
25

36
This is a step-by-step guide for adding Detox to your React Native project.
47

docs/Introduction.HowDetoxWorks.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# How Detox Works
1+
---
2+
id: Introduction.HowDetoxWorks
3+
title: How Detox Works
4+
---
25

36
Detox is an end-to-end testing framework. This means it runs your app on an actual device/simulator and interacts with it just like a real user would. This type of tests can give a lot of confidence for releasing your app and help automate a manual QA process. If you're coming from a web background, it's very similar in concept to [protractor](http://www.protractortest.org/#/).
47

docs/Introduction.Workflows.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Recommended Workflows With Detox
1+
---
2+
id: Introduction.Workflows
3+
title: Workflows
4+
---
25

36
There are multiple recommended ways to work with Detox and make it a part of your development process. Choose the best workflow for your needs:
47

docs/Introduction.WritingFirstTest.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
2-
# Writing Your First Passing Test
1+
---
2+
id: Introduction.WritingFirstTest
3+
title: Writing Your First Test
4+
---
35

46
This tutorial assumes you've already installed Detox successfully on a working React Native project.
57

docs/More.AndroidSupportStatus.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Android Support - Status Page
1+
---
2+
id: More.AndroidSupportStatus
3+
title: Android Support - Status Page
4+
---
25

36
As we are wrapping up Android support for Detox, there's already a pretty hefty chunk of Detox for Android already implemented, we decided to start releasing it as we go along, just like we did with the iOS implementation.
47

docs/More.DesignPrinciples.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Detox Design Principles
1+
---
2+
id: More.DesignPrinciples
3+
title: Design Principles
4+
---
25

36
Traditionally, end-to-end tests on mobile are riddled with inherent issues, making the testing process difficult and lowering ROI for developers. We believe that the only way to solve these issues at the core is by changing some of the basic principles of our approach.
47

docs/More.Roadmap.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Detox Development Roadmap
1+
---
2+
id: More.Roadmap
3+
title: Roadmap
4+
---
25

36
We have some very interesting plans for Detox, this is the place to discuss and share them.
47

docs/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
id: README
3+
title: detox
4+
sidebar_label: Overview
5+
---
6+
17
# Detox Documentation
28

39
## Introduction

docs/Troubleshooting.Flakiness.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Dealing With Flakiness in Tests
1+
---
2+
id: Troubleshooting.Flakiness
3+
title: Dealing With Flakiness in Tests
4+
---
25

36
> What is a flaky test?
47

docs/Troubleshooting.Installation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Troubleshooting Detox Installation
1+
---
2+
id: Troubleshooting.Installation
3+
title: Installation
4+
---
25

36
* [No simulators found](#no-simulators-found)
47

docs/Troubleshooting.RunningTests.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Troubleshooting a Test That Keeps Failing
2-
1+
---
2+
id: Troubleshooting.RunningTests
3+
title: Failing Tests
4+
---
35
* [Enable verbose mode](#enable-verbose-mode)
46
* [Syntax Error: Unxpected Token](#syntax-error-unxpected-token)
57
* [Can't find my component even though I added testID to its props](#cant-find-my-component-even-though-i-added-testid-to-its-props)

docs/Troubleshooting.Synchronization.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Dealing With Synchronization Issues in Tests
1+
---
2+
id: Troubleshooting.Synchronization
3+
title: Dealing With Synchronization Issues in Tests
4+
---
25

36
Traditionally, one of the most difficult aspects of E2E testing is synchronizing the test scenario with the app. Complex operations inside the app (like accessing servers or performing animations) often take variable amount of time to complete. We can't continue the test until they've completed. How can we synchronize the test with these operations?
47

website/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
.DS_Store
3+
lib/core/metadata.js
4+
lib/core/MetadataBlog.js
5+
website/translated_docs
6+
website/build/
7+
website/yarn.lock
8+
website/node_modules
9+
10+
website/i18n/*
11+
!website/i18n/en.json

0 commit comments

Comments
 (0)