Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docusaurus for website #491

Merged
merged 4 commits into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ matrix:
script:
- ./scripts/demo-projects.ios.sh

# Website
- language: node_js
env:
- NAME='Website - master'
node_js: 8
script:
- git config --global user.email "$GIT_USER@users.noreply.github.com"
- git config --global user.name "Daniel Schmidt"
- echo "machine github.com login $GIT_USER password $GIT_TOKEN" > ~/.netrc
- cd website && npm install && GIT_USER=$GIT_USER CURRENT_BRANCH=docusaurus npm run publish-gh-pages
branches:
only:
- master

branches:
only:
- master
Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.ActionsOnElement.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Actions on Element
---
id: APIRef.ActionsOnElement
title: Actions on Element
---

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`.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.Artifacts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Artifacts
---
id: APIRef.Artifacts
title: Artifacts
---

Artifacts currently include only logs from the app process.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.Configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Configuration Options
---
id: APIRef.Configuration
title: Configuration Options
---

## Configuring package.json
### Device Configuration
Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.DetoxCLI.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Detox Command Line Tools (detox-cli)
---
id: APIRef.DetoxCLI
title: Detox Command Line Tools (detox-cli)
---

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

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.DetoxObjectAPI.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# The `detox` Object
---
id: APIRef.DetoxObjectAPI
title: The `detox` Object
---

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

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.DeviceObjectAPI.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# The `device` Object
---
id: APIRef.DeviceObjectAPI
title: The `device` Object
---

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

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.Expect.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Expect
---
id: APIRef.Expect
title: Expect
---

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`.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.Matchers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Matchers
---
id: APIRef.Matchers
title: Matchers
---

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`.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.MockingOpenFromURL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Mocking Open from URL (Deep Links)
---
id: APIRef.MockingOpenFromURL
title: Mocking Open from URL (Deep Links)
---

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

Expand Down
6 changes: 4 additions & 2 deletions docs/APIRef.MockingUserNotifications.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

# Mocking User Notifications
---
id: APIRef.MockingUserNotifications
title: Mocking User Notifications
---

Detox supports mocking user notifications for iOS apps.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.TestLifecycle.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Test Lifecycle
---
id: APIRef.TestLifecycle
title: Test Lifecycle
---

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.

Expand Down
5 changes: 4 additions & 1 deletion docs/APIRef.waitFor.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Manual Synchronization Using `waitFor`
---
id: APIRef.waitFor
title: Manual Synchronization Using `waitFor`
---

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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.Contributing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Contributing to Detox
---
id: Guide.Contributing
title: Contributing
---

## Prerequisites

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.DebuggingInXcode.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Debugging Apps in Xcode During a Test
---
id: Guide.DebuggingInXcode
title: Debugging Apps in Xcode During a Test
---

> 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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.DevelopingWhileWritingTests.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Developing Your App While Writing Tests
---
id: Guide.DevelopingWhileWritingTests
title: Developing Your App While Writing Tests
---

> 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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.Jest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Jest as Test Runner
---
id: Guide.Jest
title: Jest
---

## Usage

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.Migration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Migration Guide
---
id: Guide.Migration
title: Migration Guide
---

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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.Mocking.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Advanced Mocking With Detox
---
id: Guide.Mocking
title: Mocking
---

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:

Expand Down
6 changes: 5 additions & 1 deletion docs/Guide.RunningLocally.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Running Tests Locally on Your Machine
---
id: Guide.RunningLocally
title: Running Locally
sidebar_label: Running Tests Locally
---

> 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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Guide.RunningOnCI.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Running Tests on CI (Travis or Bitrise)
---
id: Guide.RunningOnCI
title: Running On CI
---

> 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.

Expand Down
5 changes: 4 additions & 1 deletion docs/Introduction.Android.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Detox for Android
---
id: Introduction.Android
title: Detox for Android
---

## Setup
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.
Expand Down
5 changes: 4 additions & 1 deletion docs/Introduction.GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Getting Started
---
id: Introduction.GettingStarted
title: Getting Started
---

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

Expand Down
5 changes: 4 additions & 1 deletion docs/Introduction.HowDetoxWorks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# How Detox Works
---
id: Introduction.HowDetoxWorks
title: How Detox Works
---

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/#/).

Expand Down
5 changes: 4 additions & 1 deletion docs/Introduction.Workflows.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Recommended Workflows With Detox
---
id: Introduction.Workflows
title: Workflows
---

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:

Expand Down
6 changes: 4 additions & 2 deletions docs/Introduction.WritingFirstTest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

# Writing Your First Passing Test
---
id: Introduction.WritingFirstTest
title: Writing Your First Test
---

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

Expand Down
5 changes: 4 additions & 1 deletion docs/More.AndroidSupportStatus.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Android Support - Status Page
---
id: More.AndroidSupportStatus
title: Android Support - Status Page
---

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.

Expand Down
5 changes: 4 additions & 1 deletion docs/More.DesignPrinciples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Detox Design Principles
---
id: More.DesignPrinciples
title: Design Principles
---

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.

Expand Down
5 changes: 4 additions & 1 deletion docs/More.Roadmap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Detox Development Roadmap
---
id: More.Roadmap
title: Roadmap
---

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

Expand Down
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
id: README
title: detox
sidebar_label: Overview
---

# Detox Documentation

## Introduction
Expand Down
5 changes: 4 additions & 1 deletion docs/Troubleshooting.Flakiness.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Dealing With Flakiness in Tests
---
id: Troubleshooting.Flakiness
title: Dealing With Flakiness in Tests
---

> What is a flaky test?

Expand Down
5 changes: 4 additions & 1 deletion docs/Troubleshooting.Installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Troubleshooting Detox Installation
---
id: Troubleshooting.Installation
title: Installation
---

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

Expand Down
6 changes: 4 additions & 2 deletions docs/Troubleshooting.RunningTests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Troubleshooting a Test That Keeps Failing

---
id: Troubleshooting.RunningTests
title: Failing Tests
---
* [Enable verbose mode](#enable-verbose-mode)
* [Syntax Error: Unxpected Token](#syntax-error-unxpected-token)
* [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)
Expand Down
5 changes: 4 additions & 1 deletion docs/Troubleshooting.Synchronization.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Dealing With Synchronization Issues in Tests
---
id: Troubleshooting.Synchronization
title: Dealing With Synchronization Issues in Tests
---

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?

Expand Down
11 changes: 11 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
.DS_Store
lib/core/metadata.js
lib/core/MetadataBlog.js
website/translated_docs
website/build/
website/yarn.lock
website/node_modules

website/i18n/*
!website/i18n/en.json
Loading