build: deploy static website (#3075)

* Website: initial commit.

Clean install of Docusaurus website, following the
instructions from https://docusaurus.io/docs/installation.

* Website: update docusaurus configurations.

* Website: remove blog section.

* Website: replace docusaurus logos with Detox logos.

* Website: use Detox docs.

* Website: add content and change style.

* website.yml: add github action for website-deployment.

* Docs: fix links.

* Remove redundant label fields.

* Website: remove redundant markdown page.

* website/README.md: remove redundant file.

* website.yml: increase node version.

* fix: base url issue

* Website: replace icons.

Co-authored-by: Yaroslav Serhieiev <[email protected]>
This commit is contained in:
Asaf Korem
2021-11-16 17:12:24 +02:00
committed by GitHub
co-authored by Yaroslav Serhieiev
parent ba8be05c7c
commit fcc7bc7c3e
81 changed files with 913 additions and 82 deletions
@@ -49,7 +49,7 @@ IMPORTANT: We will not be able to help out or provide proper analysis without th
### Device logs (adb logcat)
<!--
Paste *device* logs from the Android device/emulator - associated with the failing tests, under the "details" tag below.
Device logs can be obtained either by using `adb` (e.g. by running `adb logcat` while the test is running), or by running having Detox generate them as test artifacts (i.e. by providing the `--record-logs all` argument to the "detox test ..." command - see artifacts guide (https://github.com/wix/Detox/blob/master/docs/APIRef.Artifacts.md) for more info).
Device logs can be obtained either by using `adb` (e.g. by running `adb logcat` while the test is running), or by running having Detox generate them as test artifacts (i.e. by providing the `--record-logs all` argument to the "detox test ..." command - see artifacts guide (https://wix.github.io/detox/docs/api/artifacts) for more info).
IMPORTANT: We will not be able to help out or provide proper analysis without these!
-->
@@ -64,7 +64,7 @@ IMPORTANT: We will not be able to help out or provide proper analysis without th
### Screenshots / Video
<!-- If applicable, add screenshots and videos to help explain your problem. To learn how to generate those, visit our test artifacts guide: https://github.com/wix/Detox/blob/master/docs/APIRef.Artifacts.md -->
<!-- If applicable, add screenshots and videos to help explain your problem. To learn how to generate those, visit our test artifacts guide: https://wix.github.io/detox/docs/api/artifacts -->
### Environment
+3 -3
View File
@@ -32,7 +32,7 @@ IMPORTANT! In case of a vague bug or a crash, please create an example project t
#### Screenshots / Video
<!-- If applicable, add screenshots and videos to help explain your problem. To learn how to generate those, visit our test artifacts guide: https://github.com/wix/Detox/blob/master/docs/APIRef.Artifacts.md -->
<!-- If applicable, add screenshots and videos to help explain your problem. To learn how to generate those, visit our test artifacts guide: https://wix.github.io/detox/docs/api/artifacts -->
#### Environment
@@ -52,7 +52,7 @@ IMPORTANT! In case of a vague bug or a crash, please create an example project t
#### If you are experiencing a timeout in your test
- [ ] I have followed the instructions under [Identifying which synchronization mechanism causes us to wait too much](https://github.com/wix/Detox/blob/master/docs/Troubleshooting.Synchronization.md#identifying-which-synchronization-mechanism-causes-us-to-wait-too-much), I have read [synchronization debug documentation](https://github.com/wix/DetoxSync/blob/master/IdleStatusDocumentation.md) and am providing the relevant synchronization debug output below:
- [ ] I have followed the instructions under [Identifying which synchronization mechanism causes us to wait too much](https://wix.github.io/detox/docs/troubleshooting/synchronization#identifying-which-synchronization-mechanism-causes-us-to-wait-too-much), I have read [synchronization debug documentation](https://github.com/wix/DetoxSync/blob/master/IdleStatusDocumentation.md) and am providing the relevant synchronization debug output below:
#### If you are seeing a Detox build problem (e.g. during `npm install`, not `detox build`)
@@ -84,7 +84,7 @@ IMPORTANT: We will not be able to help out or provide proper analysis without th
<!--
Paste *device* logs from the test device - associated with the failing tests, under the "details" tag below.
Device logs can be obtained by having Detox generate them as test artifacts (i.e. by providing the `--record-logs all` argument to the "detox test ..." command - see artifacts guide (https://github.com/wix/Detox/blob/master/docs/APIRef.Artifacts.md) for more info).
Device logs can be obtained by having Detox generate them as test artifacts (i.e. by providing the `--record-logs all` argument to the "detox test ..." command - see artifacts guide (https://wix.github.io/detox/docs/api/artifacts) for more info).
IMPORTANT: We will not be able to help out or provide proper analysis without these!
-->
+54
View File
@@ -0,0 +1,54 @@
name: Website
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Test Build
run: |
cd website/
npm i
npm run build
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Release to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
run: |
git config --global user.email "[email protected]"
git config --global user.name "mobilewix"
cd website/
npm i
npm run build
npx docusaurus deploy
+7 -7
View File
@@ -13,7 +13,7 @@
</p>
<h1></h1>
<img src="https://user-images.githubusercontent.com/1962469/89655670-1c235c80-d8d3-11ea-9320-0f865767ef5d.png" alt="" height=24 width=1> [![NPM Version](https://img.shields.io/npm/v/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![NPM Downloads](https://img.shields.io/npm/dm/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![Build Status](https://img.shields.io/jenkins/s/http/jenkins-oss.wixpress.com:8080/job/multi-detox-master.svg)](https://jenkins-oss.wixpress.com/job/multi-detox-master/) [![Coverage Status](https://coveralls.io/repos/github/wix/Detox/badge.svg?branch=master)](https://coveralls.io/github/wix/Detox?branch=master) [![Detox is released under the MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![PR's welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/Guide.Contributing.md) [![Twitter Follow](https://img.shields.io/twitter/follow/detoxe2e?label=Follow&style=social)](https://twitter.com/detoxe2e)
<img src="https://user-images.githubusercontent.com/1962469/89655670-1c235c80-d8d3-11ea-9320-0f865767ef5d.png" alt="" height=24 width=1> [![NPM Version](https://img.shields.io/npm/v/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![NPM Downloads](https://img.shields.io/npm/dm/detox.svg?style=flat)](https://www.npmjs.com/package/detox) [![Build Status](https://img.shields.io/jenkins/s/http/jenkins-oss.wixpress.com:8080/job/multi-detox-master.svg)](https://jenkins-oss.wixpress.com/job/multi-detox-master/) [![Coverage Status](https://coveralls.io/repos/github/wix/Detox/badge.svg?branch=master)](https://coveralls.io/github/wix/Detox?branch=master) [![Detox is released under the MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![PR's welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://wix.github.io/docs/contributing) [![Twitter Follow](https://img.shields.io/twitter/follow/detoxe2e?label=Follow&style=social)](https://twitter.com/detoxe2e)
## What Does a Detox Test Look Like?
@@ -36,7 +36,7 @@ describe('Login flow', () => {
});
```
[Get started with Detox now!](docs/Introduction.GettingStarted.md)
[Get started with Detox now!](https://wix.github.io/detox/docs/introduction/getting-started)
## About
@@ -73,21 +73,21 @@ Future versions are most likely supported, but have not been tested yet. Please
## Get Started with Detox
Read the [Getting Started Guide](docs/Introduction.GettingStarted.md) to get Detox running on your app in less than 10 minutes.
Read the [Getting Started Guide](https://wix.github.io/detox/docs/introduction/getting-started) to get Detox running on your app in less than 10 minutes.
## Documents Directory
## Documents Site
Explore further about using Detox from the [documents directory](https://github.com/wix/Detox/tree/master/docs).
Explore further about using Detox from our new **[documents site](https://wix.github.io/detox/docs)**.
## Core Principles
We believe that the only way to address the core difficulties with mobile end-to-end testing is by rethinking some of the principles of the entire approach. See what Detox [does differently](docs/Introduction.DesignPrinciples.md).
We believe that the only way to address the core difficulties with mobile end-to-end testing is by rethinking some of the principles of the entire approach. See what Detox [does differently](https://wix.github.io/detox/docs/introduction/design-principles).
## Contributing to Detox
Detox has been open-source from the first commit. If you're interested in helping out with our roadmap, please see issues tagged with the [<img src="docs/img/github-label-contributors.png">](https://github.com/wix/Detox/labels/user%3A%20looking%20for%20contributors) label. If you have encountered a bug or would like to suggest a new feature, please open an issue.
Dive into Detox core by reading the [Detox Contribution Guide](docs/Guide.Contributing.md).
Dive into Detox core by reading the [Detox Contribution Guide](https://wix.github.io/detox/docs/guide/contributing).
## License
+1 -1
View File
@@ -6,4 +6,4 @@ Graybox End-to-End Tests and Automation Library for Mobile
[![Build Status](https://img.shields.io/jenkins/s/http/jenkins-oss.wixpress.com:8080/job/multi-detox-master.svg)](https://jenkins-oss.wixpress.com/job/multi-detox-master/)
[![NPM Downloads](https://img.shields.io/npm/dm/detox.svg?style=flat)](https://www.npmjs.com/package/detox)
For more information go to our [README](https://github.com/wix/detox/blob/master/README.md) or [Read The Docs](https://github.com/wix/detox/tree/master/docs)
For more information [Read The Docs](https://wix.github.io/detox/docs).
+5 -5
View File
@@ -457,7 +457,7 @@ declare global {
/**
* Launch the app.
*
* <p>For info regarding launch arguments, refer to the [dedicated guide](https://github.com/wix/Detox/blob/master/docs/APIRef.LaunchArgs.md).
* <p>For info regarding launch arguments, refer to the [dedicated guide](https://wix.github.io/detox/docs/api/launch-args).
*
* @example
* // Terminate the app and launch it again. If set to false, the simulator will try to bring app from background,
@@ -481,7 +481,7 @@ declare global {
* Access the user-defined launch-arguments predefined through static scopes such as the Detox configuration file and
* command-line arguments. This access allows - through dedicated methods, for both value-querying and
* modification (see {@link AppLaunchArgs}).
* Refer to the [dedicated guide](https://github.com/wix/Detox/blob/master/docs/APIRef.LaunchArgs.md) for complete details.
* Refer to the [dedicated guide](https://wix.github.io/detox/docs/api/launch-args) for complete details.
*
* @example
* // With Detox being preconfigured statically to use these arguments in app launch:
@@ -1120,7 +1120,7 @@ declare global {
/**
* Sets a picker view’s column to the given value. This function supports both date pickers and general picker views. (iOS Only)
* Note: When working with date pickers, you should always set an explicit locale when launching your app in order to prevent flakiness from different date and time styles.
* See [here](https://github.com/wix/Detox/blob/master/docs/APIRef.DeviceObjectAPI.md#9-launch-with-a-specific-language-ios-only) for more information.
* See [here](https://wix.github.io/detox/docs/api/device-object-api#9-launch-with-a-specific-language-ios-only) for more information.
*
* @param column number of datepicker column (starts from 0)
* @param value string value in set column (must be correct)
@@ -1164,7 +1164,7 @@ declare global {
/**
* Takes a screenshot of the element and schedules putting it in the artifacts folder upon completion of the current test.
* For more information, see {@link https://github.com/wix/Detox/blob/master/docs/APIRef.Screenshots.md#element-level-screenshots}
* For more information, see {@link https://wix.github.io/detox/docs/api/screenshots#element-level-screenshots}
* @param {string} name for the screenshot artifact
* @returns {Promise<string>} a temporary path to the screenshot.
* @example
@@ -1367,7 +1367,7 @@ declare global {
delete?: boolean;
/**
* Arguments to pass-through into the app.
* Refer to the [dedicated guide](https://github.com/wix/Detox/blob/master/docs/APIRef.LaunchArgs.md) for complete details.
* Refer to the [dedicated guide](https://wix.github.io/detox/docs/api/launch-args) for complete details.
*/
launchArgs?: Record<string, any>;
/**
+1 -1
View File
@@ -25,7 +25,7 @@ const DETOX_ARGV_OVERRIDE_NOTICE = `
debugging flags and features, to speed up your investigation
and collect additional test artifacts. For more details, see:
https://github.com/wix/Detox/blob/master/docs/APIRef.DetoxCLI.md#detox_argv_override
https://wix.github.io/detox/docs/api/matchers/detox-cli#detox_argv_override
`;
+1 -1
View File
@@ -8,7 +8,7 @@ class DetoxAdapterImpl {
'While Detox CLI supports "-R <N>, --retries <N>" mechanism, ' +
'this outdated Jest integration does not — expect artifacts issues. ' +
'Please migrate to the new Jest Circus integration.\n\n' +
'See: https://github.com/wix/Detox/blob/master/docs/Guide.Jest.md\n');
'See: https://wix.github.io/detox/docs/api/guide/jest\n');
}
this.detox = detox;
+1 -1
View File
@@ -77,7 +77,7 @@ describe('DetoxRuntimeError', () => {
'\nExpected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }',
hint: 'Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?' +
'\nSee the article for the guidance: ' +
'https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md',
'https://wix.github.io/detox/docs/api/test-lifecycle',
debugInfo: `testSummary was: ${JSON.stringify('test name')}`,
}),
});
@@ -22,7 +22,7 @@ class DetoxRuntimeErrorComposer {
'\nExpected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }',
hint: 'Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?' +
'\nSee the article for the guidance: ' +
'https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md' +
'https://wix.github.io/detox/docs/api/test-lifecycle' +
'\ntestSummary was: ',
debugInfo: testSummary,
});
@@ -39,7 +39,7 @@ exports[`DetoxRuntimeError should be created with message with hint and debug in
Expected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }
HINT: Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?
See the article for the guidance: https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md
See the article for the guidance: https://wix.github.io/detox/docs/api/test-lifecycle
testSummary was: "test name"]
`;
@@ -36,7 +36,7 @@ exports[`DetoxRuntimeErrorComposer invalidTestSummary - afterEach 1`] = `
Expected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }
HINT: Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?
See the article for the guidance: https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md
See the article for the guidance: https://wix.github.io/detox/docs/api/test-lifecycle
testSummary was:
{
@@ -49,7 +49,7 @@ exports[`DetoxRuntimeErrorComposer invalidTestSummary - afterEach 2`] = `
Expected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }
HINT: Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?
See the article for the guidance: https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md
See the article for the guidance: https://wix.github.io/detox/docs/api/test-lifecycle
testSummary was:
{
@@ -64,7 +64,7 @@ exports[`DetoxRuntimeErrorComposer invalidTestSummary - beforeEach 1`] = `
Expected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }
HINT: Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?
See the article for the guidance: https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md
See the article for the guidance: https://wix.github.io/detox/docs/api/test-lifecycle
testSummary was:
deviceName]
@@ -6,7 +6,7 @@ exports[`failedToReachTheApp .evenThoughAppWasLaunched() 1`] = `
HINT:
The test app might have crashed prematurely, or has had trouble setting up the connection.
Refer to our troubleshooting guide, for full details: https://github.com/wix/Detox/blob/master/docs/Troubleshooting.RunningTests.md#tests-execution-hangs
Refer to our troubleshooting guide, for full details: https://wix.github.io/detox/docs/troubleshooting/running-tests#tests-execution-hangs
]
`;
@@ -16,7 +16,7 @@ exports[`failedToReachTheApp .maybeAppWasNotLaunched(action) 1`] = `
HINT:
Have you forgotten to call 'device.launchApp()' in the beginning of your test?
Refer to our troubleshooting guide, for full details: https://github.com/wix/Detox/blob/master/docs/Troubleshooting.RunningTests.md#tests-execution-hangs
Refer to our troubleshooting guide, for full details: https://wix.github.io/detox/docs/troubleshooting/running-tests#tests-execution-hangs
---
The following package could not be delivered:
@@ -1,7 +1,7 @@
const DetoxRuntimeError = require('../DetoxRuntimeError');
const message = 'Detox can\'t seem to connect to the test app(s)!';
const troubleshootingRefMessage = 'Refer to our troubleshooting guide, for full details: https://github.com/wix/Detox/blob/master/docs/Troubleshooting.RunningTests.md#tests-execution-hangs';
const troubleshootingRefMessage = 'Refer to our troubleshooting guide, for full details: https://wix.github.io/detox/docs/troubleshooting/running-tests#tests-execution-hangs';
const hintMaybeNotLaunched = `\
Have you forgotten to call 'device.launchApp()' in the beginning of your test?
+2 -2
View File
@@ -656,11 +656,11 @@ class IosExpect {
}
function throwMatcherError(param) {
throw new Error(`${param} is not a Detox matcher. More about Detox matchers here: https://github.com/wix/Detox/blob/master/docs/APIRef.Matchers.md`);
throw new Error(`${param} is not a Detox matcher. More about Detox matchers here: https://wix.github.io/detox/docs/api/matchers`);
}
function throwElementError(param) {
throw new Error(`${param} is not a Detox element. More about Detox elements here: https://github.com/wix/Detox/blob/master/docs/APIRef.Matchers.md`);
throw new Error(`${param} is not a Detox element. More about Detox elements here: https://wix.github.io/detox/docs/api/matchers`);
}
module.exports = IosExpect;
+7
View File
@@ -1,3 +1,10 @@
---
id: actions-on-element
slug: api/actions-on-element
title: Actions
sidebar_label: Actions
---
## Actions
Detox uses [matchers](APIRef.Matchers.md) to find UI elements in your app and actions to simulate user interaction with those elements.
+15 -7
View File
@@ -1,3 +1,10 @@
---
id: artifacts
slug: api/artifacts
title: Artifacts
sidebar_label: Artifacts
---
## Artifacts
Artifacts are various recordings during tests including, but not limited to, device logs, device screenshots and screen recordings (videos).
@@ -46,10 +53,11 @@ The `artifacts` object has the following properties:
| Property | Example values | Default value | Description |
|-------------|---------------------------------|---------------|-------------|
| rootDir | `".artifacts/"` | `./artifacts` | A directory, where all the recorded artifacts will be placed in. Please note that there is a trailing slash convention [described above](#slash-convention). |
| pathBuilder | `"./e2e/config/pathbuilder.js"` | `undefined` | Path to a module that exports a custom `PathBuilder` [<sup>\[a\]</sup>](#pathBuilder) |
| pathBuilder | `"./e2e/config/pathbuilder.js"` | `undefined` | Path to a module that exports a custom `PathBuilder` |
| plugins | `{ ... }` | ... see below | ... see below |
<a id=pathBuilder><sup>a</sup><code>PathBuilder</code></a> should be either an _object_ with a method `buildPathForTestArtifact` or a _class_ &mdash; see the corresponding interfaces below:
<code>PathBuilder</code> should be either an _object_ with a method `buildPathForTestArtifact` or a _class_ &mdash; see the corresponding interfaces below:
```typescript
interface PathBuilder {
@@ -176,19 +184,19 @@ Hence, for example, if you wish to enable only `testDone` screenshots and leave
##### Video Plugin
To be done. See meanwhile the example in [APIRef.Configuration.md#artifacts-configuration](APIRef.Configuration.md#artifacts-configuration).
To be done. See meanwhile the example in [artifacts configuration section](APIRef.Configuration.md#artifacts-configuration).
##### Log Plugin
To be done. See meanwhile the example in [APIRef.Configuration.md#artifacts-configuration](APIRef.Configuration.md#artifacts-configuration).
To be done. See meanwhile the example in [artifacts configuration section](APIRef.Configuration.md#artifacts-configuration).
##### Instruments Plugin
To be done. See meanwhile the example in [APIRef.Configuration.md#artifacts-configuration](APIRef.Configuration.md#artifacts-configuration).
To be done. See meanwhile the example in [artifacts configuration section](APIRef.Configuration.md#artifacts-configuration).
##### UI hierarchy Plugin
To be done. See meanwhile the example in [APIRef.Configuration.md#artifacts-configuration](APIRef.Configuration.md#artifacts-configuration).
To be done. See meanwhile the example in [artifacts configuration section](APIRef.Configuration.md#artifacts-configuration).
##### Timeline Plugin
@@ -253,7 +261,7 @@ artifacts/android.emu.release.2018-06-12 06:36:18Z/✗ Assertions should assert
#### Screenshots and Videos Do Not Appear in the Artifacts Folder
Make sure you have `detox.beforeEach(testSummary)` and `detox.afterEach(testSummary)` calls in your `./e2e/init.js`. Check out the recommendations on how to do that for [mocha](/examples/demo-react-native/e2e/init.js) and [jest](/examples/demo-react-native-jest/e2e/init.js) using the out-of-the-box adapters.
Make sure you have `detox.beforeEach(testSummary)` and `detox.afterEach(testSummary)` calls in your `./e2e/init.js`. Check out the recommendations on how to do that for [mocha](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/init.js) and [jest](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/init.js) using the out-of-the-box adapters.
#### Video Recording Issues on CI
+16 -9
View File
@@ -1,3 +1,10 @@
---
id: configuration
slug: api/configuration
title: Configuration Options
sidebar_label: Configuration Options
---
## Configuration Options
### Configuration File
@@ -16,7 +23,7 @@ In essence, Detox scans for the configuration to use, through multiple files. It
Options 1-5 allow for a standalone Detox configuration in either a `json` format or using Javascript syntax.
Option 6 means the configuration is available in `json` format inside the project's `package.json`, which is more suitable if you like having all of your project's configurations in one place.
Please find the [Detox example app](/examples/demo-react-native/detox.config.js) as a working reference. Also, look at
Please find the [Detox example app](https://github.com/wix/Detox/blob/master/examples/demo-react-native/detox.config.js) as a working reference. Also, look at
[the typings file](https://github.com/wix/Detox/blob/master/detox/index.d.ts) provided by Detox.
#### Extending configurations
@@ -153,12 +160,12 @@ A device config can have the following params:
|---|---|
|`type`| _**Required.** String Literal_. Mandatory property to discern device types: `ios.simulator`, `android.emulator`, `android.attached`, `android.genycloud`, `ios.none`, etc. |
|`device`| _**Required.** Object._ Device query, e.g. `{ "byType": "iPhone 11 Pro" }` for iOS simulator, `{ "avdName": "Pixel_2_API_29" }` for Android emulator or `{ "adbName": "<pattern>" }` for attached Android device with name matching the regex. |
|`bootArgs`| _Optional. String. Supported by `ios.simulator` and `android.emulator` only._ <br> Supply an extra **string** of arguments to `xcrun simctl boot ...` or `emulator -verbose ... @AVD_Name`. |
|`forceAdbInstall`| _Optional. Boolean. Supported for Android devices only._ <br> A **boolean** value, **false** by default. When set **true**, it tells `device.installApp()` to use `adb install`. Otherwise, it would use the combination of `adb push <app.apk>` and `adb shell pm install`. |
|`utilBinaryPaths`| _Optional. Array of strings. Supported for Android devices only._ <br> An array of relative paths of _utility_ app (apk) binary-files to preinstall on the tested devices - once before the test execution begins.<br>**Note**: these are not affected by various install-lifecycle events, such as launching an app with `device.launchApp({delete: true})`, which reinstalls the app. A good example of why this might come in handy is [Test Butler](https://github.com/linkedin/test-butler). |
|`gpuMode`| _Optional. String Literal (<code>auto &#124; host &#124; swiftshader_indirect &#124; angle_indirect &#124; guest</code>). Supported by `android.emulator` only._ <br> A fixed **string** , which tells [in which GPU mode](https://developer.android.com/studio/run/emulator-acceleration#command-gpu) the emulator should be booted. |
|`headless`| _Optional. Boolean. Supported by `android.emulator` only._ <br> _False_ by default. When set to _true_, it tells Detox to boot an Android emulator with `-no-window` option. |
|`readonly`| _Optional. Boolean. Supported by `android.emulator` only._ <br> _False_ by default. When set to _true_, it forces Detox to boot even a single emulator with `-read-only` option.<br>**Note**: when used with multiple workers, this setting has no effect — emulators will be booted always with `-read-only`. |
|`bootArgs`| _Optional. String. Supported by `ios.simulator` and `android.emulator` only._ <br /> Supply an extra **string** of arguments to `xcrun simctl boot ...` or `emulator -verbose ... @AVD_Name`. |
|`forceAdbInstall`| _Optional. Boolean. Supported for Android devices only._ <br /> A **boolean** value, **false** by default. When set **true**, it tells `device.installApp()` to use `adb install`. Otherwise, it would use the combination of `adb push <app.apk>` and `adb shell pm install`. |
|`utilBinaryPaths`| _Optional. Array of strings. Supported for Android devices only._ <br /> An array of relative paths of _utility_ app (apk) binary-files to preinstall on the tested devices - once before the test execution begins.<br />**Note**: these are not affected by various install-lifecycle events, such as launching an app with `device.launchApp({delete: true})`, which reinstalls the app. A good example of why this might come in handy is [Test Butler](https://github.com/linkedin/test-butler). |
|`gpuMode`| _Optional. String Literal (<code>auto &#124; host &#124; swiftshader_indirect &#124; angle_indirect &#124; guest</code>). Supported by `android.emulator` only._ <br /> A fixed **string** , which tells [in which GPU mode](https://developer.android.com/studio/run/emulator-acceleration#command-gpu) the emulator should be booted. |
|`headless`| _Optional. Boolean. Supported by `android.emulator` only._ <br /> _False_ by default. When set to _true_, it tells Detox to boot an Android emulator with `-no-window` option. |
|`readonly`| _Optional. Boolean. Supported by `android.emulator` only._ <br /> _False_ by default. When set to _true_, it forces Detox to boot even a single emulator with `-read-only` option.<br />**Note**: when used with multiple workers, this setting has no effect — emulators will be booted always with `-read-only`. |
Also, in the Detox `configurations` you can use the device configs as-is, without aliasing:
@@ -272,7 +279,7 @@ Similar to device configs, any app config can be inlined as well:
#### Artifacts Configuration
See more details in [APIRef.Artifacts.md](APIRef.Artifacts.md).
See more details in [artifacts doc](APIRef.Artifacts.md).
Detox can store artifacts such as transient screenshots and device logs.
You can control artifacts collection via Detox configuration:
@@ -448,7 +455,7 @@ session config:
```
Also, you can specify an optional numeric `debugSynchronization` parameter
(see also `--debug-synchronization` in [APIRef.DetoxCLI.md#test](APIRef.DetoxCLI.md#test)).
(see also `--debug-synchronization` in [detox-cli test section](APIRef.DetoxCLI.md#test)).
When an action/expectation takes a significant amount time, use this option to print device synchronization status.
The status will be printed if the action takes more than _[N]_ ms to complete.
+8 -1
View File
@@ -1,3 +1,10 @@
---
id: detox-cli
slug: api/detox-cli
title: Detox Command Line Tools
sidebar_label: Detox Command Line Tools
---
## Detox Command Line Tools (detox-cli)
`detox-cli` lets you operate Detox from command line.
@@ -44,7 +51,7 @@ Scaffolds initial E2E test folder structure for a specific test runner
| Option | Description |
| --- | --- |
| -r, --runner <test-runner-name> | test runner name (supported values: mocha, jest) |
| -r, --runner \<test-runner-name\> | test runner name (supported values: mocha, jest) |
| --help | Show help |
#### build
+10 -3
View File
@@ -1,3 +1,10 @@
---
id: detox-object-api
slug: api/detox-object-api
title: Detox Object API
sidebar_label: The `detox` Object
---
## The `detox` Object
`detox` is globally available in every test file, though currently it is only used in the setup/init file.
@@ -45,7 +52,7 @@ Then import them manually:
const {device, expect, element, by, waitFor} = require('detox');
```
Use [this example](../examples/demo-react-native/e2eExplicitRequire) for initial setup
Use [this example](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2eExplicitRequire) for initial setup
##### Reusing existing app
@@ -69,7 +76,7 @@ declare function beforeEach(testSummary: {
})
```
Usually, you are not supposed to write own implementation of this call, instead rely on Detox in-house adapters for [mocha](/examples/demo-react-native/e2e/init.js) and [jest](/examples/demo-react-native-jest/e2e/init.js) as in the examples. It should alleviate transitions to newer Detox versions for you as the chances are that API specification won't prove itself as sufficient and it may undergo rewrites and extensions.
Usually, you are not supposed to write own implementation of this call, instead rely on Detox in-house adapters for [mocha](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/init.js) and [jest](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/init.js) as in the examples. It should alleviate transitions to newer Detox versions for you as the chances are that API specification won't prove itself as sufficient and it may undergo rewrites and extensions.
> NOTE: If you are implementing support for a test runner different from Mocha and Jest, please keep in mind that *pending* (also known as *skipped*) tests should not trigger `detox.beforeEach()` at all, neither `detox.afterEach()`. The rule of thumb is either you guarantee you call them both, or you don't call anyone.
@@ -103,7 +110,7 @@ after(async () => {
:warning: **Beta**
Trace a subprocess of your test's runtime such that it would leave traces inside the [Timeline artifact](APIRef.Artifacts.md#timeline-plugin), for a later inspection.
Trace a subprocess of your test's runtime such that it would leave traces inside the [Timeline artifact](https://wix.github.io/docs/api/artifacts#timeline-plugin), for a later inspection.
Example:
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: device-object-api
slug: api/device-object-api
title: Device Object API
sidebar_label: The `device` Object
---
## The `device` Object
`device` is globally available in every test file, it enables control over the current attached device (currently only simulators are supported).
@@ -94,7 +101,7 @@ This is the most flexible way of editing the launch arguments. Refer to the [lau
#### `device.selectApp(name)`
Use **only for advanced multi-app configs** when you need to switch between your apps
within the same test scenario. Refer to the [APIRef.Configuration.md](APIRef.Configuration.md#apps-configuration)
within the same test scenario. Refer to the [configuration doc](APIRef.Configuration.md#apps-configurations)
to discover how to define multiple apps with different `name`s.
```js
@@ -106,7 +113,7 @@ app that had been running before.
#### `device.launchApp(params)`
Launch the app defined in the current [`configuration`](APIRef.Configuration.md#apps-configuration).
Launch the app defined in the current [`configuration`](APIRef.Configuration.md#apps-configurations).
`params`—object, containing one of more of the following keys and values:
+7
View File
@@ -1,3 +1,10 @@
---
id: expect
slug: api/expect
title: Expect
sidebar_label: Expect
---
## Expect
Detox uses [matchers](APIRef.Matchers.md) to match UI elements in your app and expectations to verify those elements are in the expected state.
+7
View File
@@ -1,3 +1,10 @@
---
id: launch-args
slug: api/launch-args
title: Launch Arguments
sidebar_label: Launch Arguments
---
## Launch Arguments
In Detox, the app under test is launched via an explicit call to [`device.launchApp()`](APIRef.DeviceObjectAPI.md). Through various means, Detox enables specifying a set of user-defined arguments (key-value pairs) to be passed on to the app when launched, so as to make them available inside the launched app itself at runtime (both on the native side, and - if applicable, on the Javascript side).
+7
View File
@@ -1,3 +1,10 @@
---
id: matchers
slug: api/matchers
title: Matchers
sidebar_label: Matchers
---
## Matchers
Detox uses [matchers](APIRef.Matchers.md) to match UI elements in your app.
+7
View File
@@ -1,3 +1,10 @@
---
id: mocking-open-with-url
slug: api/mocking-open-with-url
title: Mocking Open With URL (Deep Links)
sidebar_label: Mocking Open With URL (Deep Links)
---
## Mocking Open With URL (Deep Links)
You can mock opening the app from URL to test your app's deep link handling mechanism.
+7
View File
@@ -1,3 +1,10 @@
---
id: mocking-user-activity
slug: api/mocking-user-activity
title: Mocking User Activity
sidebar_label: Mocking User Activity
---
## Mocking User Activity
Detox supports mocking user activity for iOS apps.
+7
View File
@@ -1,3 +1,10 @@
---
id: mocking-user-notifications
slug: api/mocking-user-notifications
title: Mocking User Notifications
sidebar_label: Mocking User Notifications
---
## Mocking User Notifications
Detox supports mocking user notifications.
+7
View File
@@ -1,3 +1,10 @@
---
id: screenshots
slug: api/screenshots
title: Taking Screenshots
sidebar_label: Taking Screenshots
---
## Taking Screenshots
Detox supports taking in-test screenshots of the device, making the result immediately available in the form of an image file.
+8 -1
View File
@@ -1,3 +1,10 @@
---
id: test-lifecycle
slug: api/test-lifecycle
title: Test Lifecycle
sidebar_label: Test Lifecycle
---
## Test Lifecycle
Detox is test runner independent, and we encourage you to choose your own test runner, but for the sake of demonstration we will use `mocha`'s syntax.
@@ -19,7 +26,7 @@ Of course, you can add any of your initializations in this phase.
Despite being a recent and *still* an optional formation, `detox.beforeEach` and `detox.afterEach` lifecycle functions are **highly** recommended to be called in your test setups. The newer features (including test artifacts: video recordings, screenshots, logs) are not expected to work without these calls.
> **TIP**: This API is still apt to change in future, thus to minimize the risks, you are encouraged to switch to the built-in adapters for `mocha` and `jest` like in examples here: [mocha adapter example](/examples/demo-react-native/e2e/init.js), [jest adapter example](/examples/demo-react-native-jest/e2e/init.js).
> **TIP**: This API is still apt to change in future, thus to minimize the risks, you are encouraged to switch to the built-in adapters for `mocha` and `jest` like in examples here: [mocha adapter example](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/init.js), [jest adapter example](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/init.js).
If nevertheless you use another test runner with Detox (not `mocha` and not `jest`), then you have to implement a logic similar to the one below. Futurewise, consider refactoring it to an adapter and sharing with Detox project (e.g. adapter for `ava.js` or `tape`):
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: contributing
slug: contributing
title: Contributing
sidebar_label: Contributing
---
## Contributing
This guide is about contributing to our codebase.
@@ -182,7 +189,7 @@ This is in fact a monorepo that also sports some example projects (for usage ref
- `examples/demo-react-native` and `examples/demo-react-native-jest`: Demonstrate usage of Detox in React-Native app projects, with `mocha.js` and `Jest` as the hosting test-runner frameworks, respectively.
- `examples/demo-native-ios`: Demonstrates usage of Detox in a pure-native iOS app.
- `examples/demo-native-android` (broken): Demonstrates usage of Detox in a pure-native Android app.
- `examples/demo-pure-native-android`: Demonstrates usage of the *pure* [Detox-Native](../detox/detox-native/README.md) project
- `examples/demo-pure-native-android`: Demonstrates usage of the *pure* [Detox-Native](https://github.com/wix/Detox/tree/master/detox-native/README.md) project
- more...
**In order to run E2E tests associated with any of these projects, refer to the [project-specific](../examples) README's.**
**In order to run E2E tests associated with any of these projects, refer to the [project-specific](https://github.com/wix/Detox/tree/master/examples) README's.**
+7
View File
@@ -1,3 +1,10 @@
---
id: debugging-in-android-studio
slug: guide/debugging-in-android-studio
title: Debugging in Android Studio During Detox Tests
sidebar_label: Debugging in Android Studio
---
## Debugging in Android Studio During Detox Tests
> This flow is not standard and serves mostly for investigating weird crashes or
+7
View File
@@ -1,3 +1,10 @@
---
id: debugging-in-xcode
slug: guide/debugging-in-xcode
title: Debugging in Xcode During Detox Tests
sidebar_label: Debugging in Xcode During Detox Tests
---
## Debugging in Xcode During Detox Tests
> This is mostly useful for investigating weird crashes or when contributing to Detox itself. **This workflow isn't standard. Don't use it unless you have a good reason.**
@@ -1,3 +1,10 @@
---
id: developing-while-writing-tests
slug: guide/developing-while-writing-tests
title: Developing Your App While Writing Tests
sidebar_label: Developing Your App While Writing Tests
---
## 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.
+7
View File
@@ -1,3 +1,10 @@
---
id: expo
slug: guide/expo
title: Expo
sidebar_label: Expo
---
## Expo
**Note**: Expo support with Detox is entirely a community driven effort. We have no specific support in Detox for Expo applications (ejected or otherwise).
+10 -3
View File
@@ -1,3 +1,10 @@
---
id: jest
slug: guide/jest
title: Jest Setup Guide
sidebar_label: Jest Setup Guide
---
## Jest Setup Guide
> **NOTE: This article previously focused on deprecated `jest-jasmine2` runner setup, and if you nevertheless need to access it, [follow this Git history link](https://github.com/wix/Detox/blob/ef466822129a4befcda71111d02b1a334539889b/docs/Guide.Jest.md).**
@@ -42,9 +49,9 @@ detox init -r jest
If things go well, the following will be created:
- An `e2e/` folder in your project root
- An `e2e/config.json` file; [example](/examples/demo-react-native-jest/e2e/config.json)
- An `e2e/environment.js` file; [example](/examples/demo-react-native-jest/e2e/environment.js)
- An `e2e/firstTest.e2e.js` file with content similar to [this](/examples/demo-react-native-jest/e2e/app-hello.e2e.ts).
- An `e2e/config.json` file; [example](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/config.json)
- An `e2e/environment.js` file; [example](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/environment.js)
- An `e2e/firstTest.e2e.js` file with content similar to [this](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/app-hello.e2e.ts).
#### 3. Fix / Verify
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: migration
slug: guide/migration
title: Migration Guide
sidebar_label: Migration Guide
---
## 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. These migration guides refer to breaking changes. If a newer version has no entries in this document, it means it does not require special migration steps. Refer to the release notes of the later builds to learn about their improvements and changes.
@@ -73,7 +80,7 @@ For issue related to these migrations, approach us by [submitting an issue on Gi
### 18.6.0
Detox has normalized the configuration format, so that along with the combined `configurations` object you now can define your `devices` and `apps` separately.
Please refer to the [APIRef.Configuration.md](https://github.com/wix/Detox/blob/18.6.0/docs/APIRef.Configuration.md) to obtain more details.
Please refer to the [configuration doc](https://github.com/wix/Detox/blob/18.6.0/docs/APIRef.Configuration.md) to obtain more details.
This change is backward-compatible, although the new format is now the recommended option.
### 18.0
@@ -568,7 +575,7 @@ In order for Detox to be able to create artifacts, `detox.beforeEach(testSummary
Detox 8 introduces adapters for both Mocha and Jest, wrapping the original `detox.beforeEach(testSummary)` and `detox.afterEach(testSummary)` functions, for easier integration.
you are encouraged to reuse the examples of `./e2e/init.js` for [mocha](/examples/demo-react-native/e2e/init.js) and [jest](/examples/demo-react-native-jest/e2e/init.js). The gist is brought in the following sections:
you are encouraged to reuse the examples of `./e2e/init.js` for [mocha](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/init.js) and [jest](https://github.com/wix/Detox/tree/master/examples/demo-react-native-jest/e2e/init.js). The gist is brought in the following sections:
##### *Mocha*
+12 -5
View File
@@ -1,8 +1,15 @@
---
id: mocha
slug: guide/mocha
title: Mocha Setup Guide
sidebar_label: Mocha Setup Guide
---
## Mocha Setup Guide
This guide describes how to install [Mocha](mochajs.org) as a test runner to be used by Detox for running the E2E tests.
This guide describes how to install [Mocha](https://mochajs.org) as a test runner to be used by Detox for running the E2E tests.
Note that while Mocha is lightweight and easy to set up, we nevertheless encourage usage of [Jest](Guide.Jest.md]) instead, for 2 main reasons:
Note that while Mocha is lightweight and easy to set up, we nevertheless encourage usage of [Jest](Guide.Jest.md) instead, for 2 main reasons:
1. Mocha does not support parallel-test execution (i.e. splitting the test suites between concurrently running test devices/emulators).
2. Advanced integration features such as taking device screenshots on failures will not be as timely accurate as with working with Jest.
@@ -30,6 +37,6 @@ detox init -r mocha
If things go well, you should to have this set up:
- An `e2e/` folder in your project root
- An `e2e/.mocharc.json` file; [example](/examples/demo-react-native/e2e/.mocharc.json)
- An `e2e/init.js` file; [example](/examples/demo-react-native/e2e/init.js)
- An `e2e/firstTest.spec.js` file with content similar to [this](/examples/demo-react-native/e2e/example.spec.js).
- An `e2e/.mocharc.json` file; [example](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/.mocharc.json)
- An `e2e/init.js` file; [example](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/init.js)
- An `e2e/firstTest.spec.js` file with content similar to [this](https://github.com/wix/Detox/tree/master/examples/demo-react-native/e2e/example.spec.js).
+7
View File
@@ -1,3 +1,10 @@
---
id: mocking
slug: guide/mocking
title: Mocking
sidebar_label: Mocking
---
## Mocking
> This guide is a bit out of date. We hope to have it updated soon.
+7
View File
@@ -1,3 +1,10 @@
---
id: parallel-test-execution
slug: guide/parallel-test-execution
title: Parallel Test Execution
sidebar_label: Parallel Test Execution
---
## Parallel Test Execution
Detox can leverage multi worker support of JS test runners ([Jest](http://jestjs.io/docs/en/cli#maxworkers-num), [AVA](https://github.com/avajs/ava#process-isolation), etc.).
+7
View File
@@ -1,3 +1,10 @@
---
id: running-locally
slug: guide/running-locally
title: Running Locally
sidebar_label: Running Locally
---
## Running 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.
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: running-on-ci
slug: guide/running-on-ci
title: Running on CI
sidebar_label: Running on CI
---
## 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.
@@ -9,7 +16,7 @@ Running Detox on CI is not that different from running it locally. There are two
### Step 1: Prepare a Release Configuration for Your App
We will need to create a [release device configuration for Detox](/docs/APIRef.Configuration.md#device-configuration) inside `package.json` under the `detox` section.
We will need to create a [release device configuration for Detox](APIRef.Configuration.md#device-configuration) inside `package.json` under the `detox` section.
**Example:**
@@ -56,7 +63,7 @@ detox test --configuration ios.sim.release --cleanup
#### • Running Detox on [Travis CI](https://travis-ci.org/)
Detox's own build is running on Travis, check out Detox's [.travis.yml](/.travis.yml) file to see how it's done.
Detox's own build is running on Travis, check out Detox's [.travis.yml](https://github.com/wix/Detox/tree/master/.travis.yml) file to see how it's done.
This is a simple example configuration to get you started with Detox on Travis:
+7
View File
@@ -1,3 +1,10 @@
---
id: third-party-drivers
slug: guide/third-party-drivers
title: Third-Party Drivers
sidebar_label: Third-Party Drivers
---
## Third-Party Drivers
Detox comes with built-in support for running on Android and iOS by choosing a driver type in your Detox configurations.
+7
View File
@@ -1,3 +1,10 @@
---
id: uninstalling
slug: guide/uninstalling
title: Uninstalling Detox
sidebar_label: Uninstalling Detox
---
## Uninstalling Detox
Installing and using Detox implies certain side effects: cloned devices, cache files, state files, temporary files, etc.
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: android
slug: introduction/android
title: Detox for Android
sidebar_label: Detox for Android
---
<!-- markdownlint-configure-file { "no-trailing-punctuation": 0 } -->
## Detox for Android
@@ -76,7 +83,7 @@ Following device types could be used to control Android devices:
Use this type to connect to Genymotion emulator.
The `avdName` property accepts a regular expression pattern that allows to specify the pool of device candidates to which you wish to connect. Use this property to run tests in parallel on multiple attached devices.
For a complete, working example, refer to the [Detox example app](/examples/demo-react-native/detox.config.js).
For a complete, working example, refer to the [Detox example app](https://github.com/wix/Detox/tree/master/examples/demo-react-native/detox.config.js).
##### 2a. Using product flavors
@@ -187,7 +194,7 @@ _Note: most guides advise of defining a global `kotlinVersion` constant - as in
Detox requires a dummy implementation of a single Android-native test.
1. Add a new file to your project, under this path and name: `android/app/src/androidTest/java/com/[your.package]/DetoxTest.java`. **Double-check that the path is correct!**
2. Copy & paste the content of the equivalent file from [the detox example app for RN](../examples/demo-react-native/android/app/src/androidTest/java/com/example/DetoxTest.java), into it. **Don't forget to change the package name to your project's package name!**
2. Copy & paste the content of the equivalent file from [the detox example app for RN](https://github.com/wix/Detox/tree/master/examples/demo-react-native/android/app/src/androidTest/java/com/example/DetoxTest.java), into it. **Don't forget to change the package name to your project's package name!**
#### 6. Enable clear-text (unencrypted) traffic for Detox
+9 -2
View File
@@ -1,3 +1,10 @@
---
id: android-dev-env
slug: introduction/android-dev-env
title: Setting Up an Android Development & Testing Environment
sidebar_label: Setting Up an Android Development & Testing Environment
---
## Setting Up an Android Development & Testing Environment
This guide provides some core practices to follow in setting up a stable, reliable environment for running automated UI tests using Android emulators (using Detox, in particular) -- be it on a personal, _local_ computer, or a powerful CI machine.
@@ -62,7 +69,7 @@ Fortunately, the Android team at Google offers a pretty decent alternative: **AO
*Here's a visual comparison between the two - an SDK 28 (Android 9) AOSP emulator (left) vs. an emulator with Google API's installed (right):*
<img src="img/android/aosp-vs-googleapi.png" alt="AOSP vs Google-API" style="zoom:75%;" />
<img src="img/android/aosp-vs-googleapi.png" alt="AOSP vs Google-API" />
### Here's how to install them using the command line
@@ -140,7 +147,7 @@ Start by launching a freshly baked emulator. Wait for it to go stable.
When running, go to settings (3 dots in the sidebar) > `Snapshots` > `Settings` tab. If not already set, select `Yes` in the `auto-save` option. This should prompt for a restart -- choose `Yes`. The emulator should restart **and save a snapshot.**
<img src="img/android/snapshot-autosave.png" alt="Emulator auto-save menu" style="zoom:50%;" />
<img src="img/android/snapshot-autosave.png" alt="Emulator auto-save menu" />
Do this again after the emulator is back up, but set `No` in the `auto-save` option. Allow it to restart yet again: it will immediately boot into the state saved as a snapshot earlier.
+7
View File
@@ -1,3 +1,10 @@
---
id: design-principles
slug: introduction/design-principles
title: Design Principles
sidebar_label: Design Principles
---
## 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.
+7
View File
@@ -1,3 +1,10 @@
---
id: getting-started
slug: introduction/getting-started
title: Getting Started
sidebar_label: Getting Started
---
## Getting Started
**Welcome to Detox!**
+7
View File
@@ -1,3 +1,10 @@
---
id: how-detox-works
slug: introduction/how-detox-works
title: How Detox Works
sidebar_label: How Detox Works
---
## 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 testing can give a lot of confidence in your app and help automate a manual QA process.
+7
View File
@@ -1,3 +1,10 @@
---
id: workflows
slug: introduction/workflows
title: Workflows
sidebar_label: Workflows
---
## 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:
+7
View File
@@ -1,3 +1,10 @@
---
id: writing-first-test
slug: introduction/writing-first-test
title: Writing Your First Test
sidebar_label: Writing Your First Test
---
## Writing Your First Test
This tutorial assumes you've already installed Detox successfully on a working React Native project.
+7
View File
@@ -1,3 +1,10 @@
---
id: ios
slug: introduction/ios
title: Detox for iOS
sidebar_label: Detox for iOS
---
## Detox for iOS
### 1. Preliminary
+8 -1
View File
@@ -1,4 +1,11 @@
## Setting Up an iOS Environment
---
id: ios-dev-env
slug: introduction/ios-dev-env
title: Setting Up an iOS Development & Testing Environment
sidebar_label: Setting Up an iOS Development & Testing Environment
---
## Setting Up an iOS Development & Testing Environment
This guide sums up the tools required for an environment for running automated UI tests using iOS simulators (using Detox, in particular).
+7
View File
@@ -1,3 +1,10 @@
---
id: building-the-app
slug: troubleshooting/building-the-app
title: Dealing With Problems With Building the App & Detox
sidebar_label: Dealing With Problems With Building the App & Detox
---
## Dealing With Problems With Building the App & Detox
This page is about issues related to building the app, typically triggerred when running `detox build` (and not `detox test`, for example).
+7
View File
@@ -1,3 +1,10 @@
---
id: flakiness
slug: troubleshooting/flakiness
title: Dealing With Flakiness in Tests
sidebar_label: Dealing With Flakiness in Tests
---
## Dealing With Flakiness in Tests
> What is a flaky test?
+14 -7
View File
@@ -1,3 +1,10 @@
---
id: running-tests
slug: troubleshooting/running-tests
title: Dealing With Problems With Running Tests
sidebar_label: Dealing With Problems With Running Tests
---
## Dealing With Problems With Running Tests
This page is about issues related to executing your Detox tests, typically triggerred when running `detox test` (and not `detox build`, for example).
@@ -148,7 +155,7 @@ In the test above, after tapping the Login button, the app performs several comp
**Solution:** When you suspect that automatic synchronization didn't work, you have a fail-safe by synchronizing manually with `waitFor`. Using `waitFor` will poll until the expectation is met. This isn't a recommended approach so please use it as a workaround and open and issue to resolve the synchronization issue.
Full documentation about `waitFor` is available [here](/docs/APIRef.waitFor.md). This is what the fixed test would look like:
This is what the fixed test would look like:
```js
await element(by.text('Login')).tap();
@@ -157,7 +164,7 @@ await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(2000);
#### Can't synchronize the test with my app
If you suspect that the test is failing because Detox fails to synchronize the test steps with your app, take a look at this in-depth [synchronization troubleshooting tutorial](/docs/Troubleshooting.Synchronization.md).
If you suspect that the test is failing because Detox fails to synchronize the test steps with your app, take a look at this in-depth [synchronization troubleshooting tutorial](Troubleshooting.Synchronization.md).
#### Unknown option "configuration" (Mocha.js)
@@ -207,7 +214,7 @@ a `ui.viewhierarchy` in a folder of your failing test. Please mind that you need
| in `visibilityFailingScreenshots` | in `visibilityFailingRects` |
|:-------:|:---------:|
|<img alt="visible" src="https://user-images.githubusercontent.com/2270433/94178906-68872380-fea4-11ea-845c-c55c25b68c0e.png" height=480>|<img alt="internals" src="https://user-images.githubusercontent.com/2270433/94178919-6c1aaa80-fea4-11ea-8db6-64f1f4b21361.png" height=480>|
|<img alt="visible" src="https://user-images.githubusercontent.com/2270433/94178906-68872380-fea4-11ea-845c-c55c25b68c0e.png" height="480" />|<img alt="internals" src="https://user-images.githubusercontent.com/2270433/94178919-6c1aaa80-fea4-11ea-8db6-64f1f4b21361.png" height="480" />|
The first is supposed to show what is seen on screen. The second shows the internal buffer that Detox tests for visibility; if the pixels aren't transparent enough and less than 75% of tested region is not transparent, the view is not considered visible.
@@ -228,10 +235,10 @@ Do the following:
2. Open Xcode
3. Attach Xcode to your app's process
<img src="img/attach-to-process.jpg">
<img src="img/attach-to-process.jpg" />
4. Press the `Debug View Hierarchy` button
<img src="img/debug-view-hierarchy.jpg">
<img src="img/debug-view-hierarchy.jpg" />
5. This will open the hierarchy viewer, and will show a breakdown of your app's native view hierarchy. Here you can browse through the views
@@ -247,13 +254,13 @@ Let's see an example. We will find the following view in the native hierarchy:
This is the hierarchy viewer, pointing to the native view just mentioned:
<img src="img/hierarchy-viewer.jpg">
<img src="img/hierarchy-viewer.jpg" />
#### Compare to a Working Setup
If you feel lost, try starting from a working example for sanity.
There are multiple working examples included in this repo, such as [demo-react-native](/examples/demo-react-native).
There are multiple working examples included in this repo, such as [demo-react-native](https://github.com/wix/Detox/tree/master/examples/demo-react-native).
First, install, build and make sure the tests are indeed passing. If they are, try comparing this setup with what you have.
+8 -1
View File
@@ -1,3 +1,10 @@
---
id: synchronization
slug: troubleshooting/synchronization
title: Dealing With Synchronization Issues in Tests
sidebar_label: Dealing With Synchronization Issues in Tests
---
## 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?
@@ -137,7 +144,7 @@ await device.launchApp({
#### How do we wait manually?
This makes sense only if we're not waiting enough (or if we've disabled automatic synchronization). Use the `withTimeout()` API to wait until an expectation is met. The API is documented [here](/docs/APIRef.Expect.md#withtimeouttimeout).
This makes sense only if we're not waiting enough (or if we've disabled automatic synchronization). Use the `withTimeout()` API to wait until an expectation is met. The API is documented [here](https://github.com/wix/detox/docs/api/expect#withtimeouttimeout).
### Tweaking and fine-tuning the synchronization mechanisms
+7
View File
@@ -1,3 +1,10 @@
---
id: troubleshooting
slug: troubleshooting/troubleshooting
title: Troubleshooting
sidebar_label: Troubleshooting
---
## Troubleshooting
Issues related to building the app:
+1 -1
View File
@@ -4,7 +4,7 @@
#### Fundamentals
**IMPORTANT:** Get your environment properly set up, as explained in our [contribution guide](../../docs/Guide.Contributing.md).
**IMPORTANT:** Get your environment properly set up, as explained in our [contribution guide](https://wix.github.io/docs/contributing).
#### Step 1: Build the Demo Project
+20
View File
@@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
+110
View File
@@ -0,0 +1,110 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Detox',
tagline: 'Gray box end-to-end testing and automation framework for mobile apps',
url: 'https://wix.github.io',
baseUrl: '/Detox/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: '/img/favicon.ico',
organizationName: 'wix',
projectName: 'detox',
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/wix/Detox/edit/master/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Detox',
logo: {
alt: 'Detox Logo',
src: '/img/logo.png',
},
items: [
{
type: 'doc',
docId: 'getting-started',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/wix/Detox',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Getting Started',
to: 'docs/introduction/getting-started',
},
{
label: 'Contributing to Detox',
to: 'docs/contributing',
},
],
},
{
title: 'Support',
items: [
{
label: 'Ask a question on Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/detox',
},
{
label: 'Create new issue on Github',
href: 'https://github.com/wix/Detox/issues/new/choose',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/wix/Detox',
},
{
label: 'Twitter',
href: 'https://twitter.com/detoxe2e/',
},
],
},
]
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;
+42
View File
@@ -0,0 +1,42 @@
{
"name": "website",
"version": "0.0.0",
"private": true,
"scripts": {
"postinstall": "patch-package",
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.9",
"@docusaurus/preset-classic": "2.0.0-beta.9",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
"patch-package": "^6.4.7",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
@@ -0,0 +1,12 @@
diff --git a/node_modules/@docusaurus/core/lib/commands/start.js b/node_modules/@docusaurus/core/lib/commands/start.js
index 88040f2..536d89d 100644
--- a/node_modules/@docusaurus/core/lib/commands/start.js
+++ b/node_modules/@docusaurus/core/lib/commands/start.js
@@ -145,6 +145,7 @@ async function start(siteDir, cliOptions) {
stats: 'summary',
},
static: {
+ publicPath: baseUrl,
directory: path_1.default.resolve(siteDir, constants_1.STATIC_DIR_NAME),
watch: {
// Useful options for our own monorepo using symlinks!
+88
View File
@@ -0,0 +1,88 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
tutorialSidebar: [
{
type: 'category',
label: 'Introduction',
items: [
'getting-started',
'ios-dev-env',
'android-dev-env',
'ios',
'android',
'writing-first-test',
'how-detox-works',
'design-principles',
'workflows'
]
},
{
type: 'category',
label: 'API Reference',
items: [
'detox-cli',
'configuration',
'detox-object-api',
'device-object-api',
'test-lifecycle',
'matchers',
'actions-on-element',
'expect',
'mocking-open-with-url',
'mocking-user-notifications',
'mocking-user-activity',
'artifacts',
'screenshots'
]
},
{
type: 'category',
label: 'Troubleshooting',
items: [
'troubleshooting',
'building-the-app',
'running-tests',
'synchronization',
'flakiness',
]
},
{
type: 'category',
label: 'Guides',
items: [
'running-locally',
'developing-while-writing-tests',
'running-on-ci',
'debugging-in-xcode',
'debugging-in-android-studio',
'mocking',
'jest',
'mocha',
'parallel-test-execution',
'third-party-drivers',
'uninstalling',
'expo',
]
},
{
type: 'doc',
label: 'Contributing',
id: 'contributing'
},
],
};
module.exports = sidebars;
@@ -0,0 +1,89 @@
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';
const FeatureList = [
{
title: 'Supports Different Test Runners',
Svg: require('../../static/img/test-runner.svg').default, // taken from: https://uxwing.com/testing-icon/
description: (
<>
Use Jest or Mocha as the test runner (spoiler: we have our favorite).
</>
),
},
{
title: 'Cross Platform',
Svg: require('../../static/img/cross-platform.svg').default, // taken from: https://uxwing.com/magic-icon/
description: (
<>
Write cross-platform end-to-end tests in JavaScript.
Currently supports iOS and Android.
</>
),
},
{
title: 'Debuggable',
Svg: require('../../static/img/debug.svg').default, // taken from: https://uxwing.com/bug-icon/
description: (
<>
Modern async-await API allows breakpoints in asynchronous tests to work as expected.
</>
),
},
{
title: 'Automatically Synchronized',
Svg: require('../../static/img/sync.svg').default, // taken from: https://uxwing.com/wait-sandclock-icon/
description: (
<>
Stops flakiness at the core by monitoring asynchronous operations in your app.
</>
),
},
{
title: 'Made For CI',
Svg: require('../../static/img/ci.svg').default, // taken from: https://iconarchive.com/show/flatastic-9-icons-by-custom-icon-design/Semi-success-icon.html
description: (
<>
Execute your E2E tests on CI platforms like Travis CI, CircleCI or Jenkins without grief.
</>
),
},
{
title: 'Runs on Devices',
Svg: require('../../static/img/devices.svg').default, // taken from: https://uxwing.com/mobile-phone-icon/
description: (
<>
Gain confidence to ship by testing your app on a device/simulator just like a real user (not yet supported on iOS).
</>
),
},
];
function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureImage} alt={title} />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}
@@ -0,0 +1,13 @@
.features {
display: flex;
align-items: center;
padding: 5rem 0;
width: 100%;
}
.featureImage {
height: 64px;
width: 64px;
stroke: white;
stroke-width: 2px;
}
+28
View File
@@ -0,0 +1,28 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #55a9be;
--ifm-color-primary-dark: #2c3641;
--ifm-color-primary-darker: #202e3d;
--ifm-color-primary-darkest: #000f20;
--ifm-color-primary-light: rgb(70, 203, 174);
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-code-font-size: 95%;
}
.docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}
+41
View File
@@ -0,0 +1,41 @@
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import styles from './index.module.css';
import HomepageFeatures from '../components/HomepageFeatures';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/introduction/getting-started">
Getting Started with Detox
</Link>
<iframe className={styles.githubStar}
src='https://ghbtns.com/github-btn.html?user=wix&repo=detox&type=star&count=true&size=large'
frameBorder='0' scrolling='0' width='170' height='30' title='GitHub'/>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout>
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}
+30
View File
@@ -0,0 +1,30 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
color: white;
text-align: center;
position: relative;
overflow: hidden;
background: rgb(111,127,147);
background: radial-gradient(circle, rgba(111,127,147,1) 0%, rgba(80,94,111,1) 24%, rgba(44,54,65,1) 50%, rgba(44,54,65,1) 99%);
}
.githubStar {
margin: 0 1rem;
}
@media screen and (max-width: 966px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}
View File
+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><defs><style>.cls-1{fill:#00a912;fill-rule:evenodd;}</style></defs><title>work-started</title><path d="M101.64,14.77a5.92,5.92,0,0,0-8.52,0l-6.49,6.47a42.27,42.27,0,0,0-5.51-3A55.41,55.41,0,0,0,75.24,16V6A5.77,5.77,0,0,0,73.5,1.74,5.76,5.76,0,0,0,69.24,0H56.75a5.83,5.83,0,0,0-4.2,1.74A5.77,5.77,0,0,0,50.77,6v9.11A44.41,44.41,0,0,0,44.71,17a45.38,45.38,0,0,0-5.59,2.58l-7.19-7.09a5.5,5.5,0,0,0-4.16-1.8,5.88,5.88,0,0,0-4.26,1.8l-8.74,8.77a5.92,5.92,0,0,0,0,8.52l6.47,6.49a42.27,42.27,0,0,0-3,5.51A53.34,53.34,0,0,0,16,47.64H6a5.77,5.77,0,0,0-4.26,1.74A5.76,5.76,0,0,0,0,53.64V66.13a5.83,5.83,0,0,0,1.74,4.2A5.73,5.73,0,0,0,6,72.11h9.12A44.39,44.39,0,0,0,17,78.17a56.7,56.7,0,0,0,2.58,5.72L12.47,91a5.5,5.5,0,0,0-1.8,4.16,5.88,5.88,0,0,0,1.8,4.26l8.77,8.87a6.24,6.24,0,0,0,8.52,0l6.49-6.59a44.14,44.14,0,0,0,5.51,3,57.72,57.72,0,0,0,5.88,2.3v9.95a5.94,5.94,0,0,0,6,6H66.13a5.83,5.83,0,0,0,4.2-1.74,5.73,5.73,0,0,0,1.78-4.26v-9.11a44.41,44.41,0,0,0,6.06-1.87,54.56,54.56,0,0,0,5.72-2.58L91,110.41a5.82,5.82,0,0,0,8.42,0l8.87-8.76a6.25,6.25,0,0,0,0-8.53l-6.6-6.49a42.27,42.27,0,0,0,3-5.51,57.72,57.72,0,0,0,2.3-5.88h9.95a5.94,5.94,0,0,0,6-6V56.75a5.83,5.83,0,0,0-1.74-4.2,5.73,5.73,0,0,0-4.26-1.78h-9.11a51.84,51.84,0,0,0-1.87-6,44.42,44.42,0,0,0-2.58-5.66l7.09-7.18a5.5,5.5,0,0,0,1.8-4.16,5.88,5.88,0,0,0-1.8-4.26l-8.77-8.74Zm-40.2,10A36.63,36.63,0,1,1,35.52,35.52,36.53,36.53,0,0,1,61.44,24.79Z"/><path class="cls-1" d="M61.44,32.87A28.58,28.58,0,1,1,32.87,61.44,28.58,28.58,0,0,1,61.44,32.87Zm-8.9,24,5.08,4.79,12-12.17c1-1,1.62-1.82,2.85-.56l4,4.08c1.31,1.3,1.24,2.06,0,3.26L59.9,72.59c-2.6,2.55-2.15,2.71-4.79.09l-9.27-9.22A1.15,1.15,0,0,1,46,61.67l4.62-4.79c.7-.74,1.26-.67,2,0Z"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 115.8 122.88" style="enable-background:new 0 0 115.8 122.88" xml:space="preserve"><style type="text/css">.st0{fill-rule:evenodd;clip-rule:evenodd;}</style><g><path class="st0" d="M47.72,18.27l6.45,30.76l30.7,6.72L57.61,71.39l3.09,31.27l-23.3-21.09L8.62,94.18l12.86-28.68L0.59,42.02 l31.25,3.37L47.72,18.27L47.72,18.27L47.72,18.27z M65.23,95.27l26.66,27.12c0.64,0.65,1.7,0.65,2.35,0.01l10.36-10.27 c0.65-0.64,0.65-1.7,0.01-2.35L68.17,72.83c-0.64-0.65-2.33-0.92-2.35-0.01L65.23,95.27L65.23,95.27L65.23,95.27z M80.97,105.29 l12.16,12.43c0.37,0.38,0.99,0.38,1.37,0l6.04-5.98c0.38-0.38,0.38-0.99,0-1.37L88.1,97.74L80.97,105.29L80.97,105.29z M16.14,33.07h-0.51c0-4.18-1.56-7.83-4.68-10.95C7.82,19.01,4.17,17.45,0,17.45v-0.51c4.17,0,7.82-1.56,10.94-4.68 c3.12-3.13,4.68-6.78,4.68-10.94l0.51,0c0,4.17,1.56,7.82,4.68,10.94c3.12,3.12,6.77,4.68,10.94,4.68v0.51 c-4.17,0-7.82,1.56-10.94,4.68C17.7,25.25,16.14,28.89,16.14,33.07L16.14,33.07L16.14,33.07z M91.74,48.91h-0.79 c0-6.43-2.4-12.05-7.21-16.85c-4.81-4.8-10.42-7.2-16.85-7.2v-0.79c6.43,0,12.05-2.4,16.85-7.22C88.55,12.02,90.95,6.41,90.95,0 l0.79,0c0,6.43,2.4,12.05,7.21,16.85c4.81,4.8,10.42,7.21,16.85,7.21v0.79c-6.43,0-12.04,2.4-16.85,7.2 C94.14,36.86,91.74,42.48,91.74,48.91L91.74,48.91L91.74,48.91z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 116.96 122.88" style="enable-background:new 0 0 116.96 122.88" xml:space="preserve"><style type="text/css">.st0{fill-rule:evenodd;clip-rule:evenodd;}</style><g><path class="st0" d="M91.53,67.05c0.03,0.85,0.05,1.71,0.05,2.58c0,2.38-0.12,4.71-0.37,6.99l14.92,7.57 c1.58,0.8,2.62,2.26,2.93,3.88l6.36,28.08c0.67,2.97-1.2,5.92-4.17,6.59c-2.97,0.67-5.92-1.2-6.59-4.17l-5.82-25.7l-9.88-5.01 c-4.98,16.53-16.52,28.11-29.96,28.11c-13.52,0-25.11-11.72-30.04-28.41l-10.8,4.9l-4.95,25.94c-0.57,3-3.47,4.96-6.46,4.39 c-3-0.57-4.96-3.47-4.39-6.46l5.47-28.64c0.3-1.75,1.44-3.32,3.17-4.1l15.77-7.16c-0.23-2.24-0.35-4.53-0.35-6.79v-0.01 c0-0.87,0.02-1.74,0.05-2.61L9.83,61.27c-1.74-0.6-2.99-1.99-3.48-3.64l-0.02,0l-6.1-20.21c-0.87-2.92,0.79-6,3.72-6.87 c2.92-0.87,6,0.79,6.87,3.72l5.28,17.5l13.33,4.6l59.22,0l12.21-4.21l5.28-17.5c0.87-2.92,3.95-4.59,6.87-3.72 c2.92,0.87,4.59,3.95,3.72,6.87l-6.1,20.21l-0.02,0c-0.49,1.64-1.74,3.03-3.48,3.63L91.53,67.05L91.53,67.05L91.53,67.05z M58.66,25.55c2.07,0,4.09,0.39,6.03,1.11c0.71-1.57,1.35-3.04,1.94-4.38C72.81,8.23,73.61,6.4,94.9,0.15 c1.99-0.58,4.08,0.56,4.67,2.55c0.59,1.99-0.56,4.08-2.55,4.67c-17.93,5.26-18.57,6.72-23.5,17.95c-0.69,1.56-1.45,3.29-2.35,5.27 c5.61,4.84,10.02,12.84,12.28,22.51l-49.58,0c2.27-9.67,6.67-17.67,12.28-22.51c-0.91-1.98-1.67-3.71-2.35-5.27 c-4.93-11.23-5.58-12.69-23.5-17.95c-1.99-0.58-3.13-2.68-2.55-4.67c0.59-1.99,2.67-3.13,4.67-2.55C43.7,6.4,44.5,8.23,50.68,22.28 c0.59,1.34,1.24,2.81,1.95,4.38C54.56,25.94,56.58,25.55,58.66,25.55L58.66,25.55L58.66,25.55z M67.99,36.6 c2.77,0,5.02,2.25,5.02,5.02c0,2.77-2.25,5.02-5.02,5.02c-2.77,0-5.02-2.25-5.02-5.02C62.97,38.85,65.22,36.6,67.99,36.6 L67.99,36.6z M49.32,36.6c2.77,0,5.02,2.25,5.02,5.02c0,2.77-2.25,5.02-5.02,5.02s-5.02-2.25-5.02-5.02 C44.3,38.85,46.55,36.6,49.32,36.6L49.32,36.6z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.34 122.88"><defs><style>.cls-1{fill-rule:evenodd;}</style></defs><title>mobile-phone</title><path class="cls-1" d="M13.33,0H57A13.37,13.37,0,0,1,70.34,13.33v96.22A13.37,13.37,0,0,1,57,122.88H13.33A13.35,13.35,0,0,1,0,109.54V13.33A13.35,13.35,0,0,1,13.33,0ZM35.16,108.37a5.46,5.46,0,1,1-5.45,5.46,5.47,5.47,0,0,1,5.45-5.46Zm31.34-4.19V16.75H3.83v87.43Z"/></svg>

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 120.04"><title>wait-sandclock</title><path d="M62.86,8.32a4.16,4.16,0,1,1,0-8.32,60,60,0,1,1-52.1,30.22L6.88,31.7a5.07,5.07,0,1,1-3.61-9.48l13.2-5A5.06,5.06,0,0,1,18,16.85a5,5,0,0,1,5.64,3.53l4.14,13.51a5.06,5.06,0,0,1-9.68,2.93L17.58,35A51.73,51.73,0,1,0,62.86,8.32ZM41.05,84.05c-2.18,0-3.95-1.47-3.95-3.28s1.77-3.28,3.95-3.28h3.79a24.81,24.81,0,0,1,5.43-12.76A22.24,22.24,0,0,1,55.52,60a22.51,22.51,0,0,1-5.25-4.79,24.81,24.81,0,0,1-5.43-12.75H41.05c-2.18,0-3.95-1.47-3.95-3.29s1.77-3.28,3.95-3.28H84.56c2.18,0,4,1.47,4,3.28s-1.77,3.29-4,3.29h-3.8a24.8,24.8,0,0,1-5.42,12.75A22.55,22.55,0,0,1,70.08,60a22.28,22.28,0,0,1,5.26,4.78,24.79,24.79,0,0,1,5.42,12.76h3.8c2.18,0,4,1.47,4,3.28s-1.77,3.28-4,3.28ZM76,77.22a20.15,20.15,0,0,0-4.31-9.54c-2.58-3.2-5.88-5.38-8.88-5.38s-6.29,2.18-8.87,5.38a20.16,20.16,0,0,0-4.32,9.54Zm-4.31-25A20.23,20.23,0,0,0,76,42.67H49.61a20.24,20.24,0,0,0,4.32,9.55c2.58,3.2,5.87,5.37,8.87,5.37s6.3-2.17,8.88-5.37Z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111.56 122.88"><defs><style>.cls-1{fill-rule:evenodd;}</style></defs><title>testing</title><path class="cls-1" d="M79.86,65.67a25,25,0,0,1,20.89,38.62l10.81,11.78-7.46,6.81L93.68,111.42A25,25,0,1,1,79.86,65.67Zm-42.65.26a2.74,2.74,0,0,1-2.6-2.84,2.71,2.71,0,0,1,2.6-2.84h15.4a2.76,2.76,0,0,1,2.6,2.84,2.71,2.71,0,0,1-2.6,2.84ZM22.44,57.22a5.67,5.67,0,1,1-5.67,5.67,5.67,5.67,0,0,1,5.67-5.67Zm2-18.58a2,2,0,0,1,2.85,0,2.07,2.07,0,0,1,0,2.89l-2,2,2,2a2,2,0,0,1,0,2.87,2,2,0,0,1-2.84,0l-2-2-2,2a2,2,0,0,1-2.86,0,2.07,2.07,0,0,1,0-2.89l2-2-2-2.05a2,2,0,0,1,2.87-2.86l2,2,2-2ZM16.85,21.52a2.29,2.29,0,0,1,3.16.63l1.13,1.36,4-5.05a2.27,2.27,0,1,1,3.51,2.88l-5.86,7.34a2.48,2.48,0,0,1-.55.52,2.28,2.28,0,0,1-3.16-.63l-2.84-3.89a2.28,2.28,0,0,1,.63-3.16Zm66.51-4.25h9.32a6.69,6.69,0,0,1,6.66,6.65v30.9c-.2,2.09-5.31,2.11-5.75,0V23.92a.93.93,0,0,0-.27-.67.91.91,0,0,0-.67-.27H83.32V54.82c-.49,1.89-4.75,2.18-5.71,0V6.66A1,1,0,0,0,77.34,6a.93.93,0,0,0-.67-.27h-70A.93.93,0,0,0,6,6a1,1,0,0,0-.27.68V85.79a1,1,0,0,0,.27.68.93.93,0,0,0,.67.27H44.74c2.88.29,3,5.27,0,5.71H21.66v10.61a.92.92,0,0,0,.94.94H44.74c2.09.24,2.76,5,0,5.71H22.64a6.54,6.54,0,0,1-4.7-2,6.63,6.63,0,0,1-2-4.7V92.45H6.66A6.69,6.69,0,0,1,0,85.79V6.66A6.54,6.54,0,0,1,2,2a6.61,6.61,0,0,1,4.7-2h70a6.55,6.55,0,0,1,4.7,2,6.65,6.65,0,0,1,2,4.7V17.27ZM37.18,26.44a2.75,2.75,0,0,1-2.6-2.84,2.71,2.71,0,0,1,2.6-2.84H63.86a2.74,2.74,0,0,1,2.6,2.84,2.71,2.71,0,0,1-2.6,2.84Zm0,19.74a2.74,2.74,0,0,1-2.6-2.83,2.71,2.71,0,0,1,2.6-2.84H63.86a2.74,2.74,0,0,1,2.6,2.84,2.7,2.7,0,0,1-2.6,2.83ZM70.45,93a3.46,3.46,0,0,1-.34-.44,3.4,3.4,0,0,1-.26-.5,3.18,3.18,0,0,1,4.57-4,2.93,2.93,0,0,1,.49.38h0c.87.83,1.15,1,2.11,1.87l.84.74,6.79-7.29c2.87-3,7.45,1.37,4.58,4.4l-8.47,9.06-.43.45a3.19,3.19,0,0,1-4.43.19l0,0c-.22-.19-.44-.4-.66-.6-.52-.46-1.06-.94-1.61-1.41-1.26-1.09-2-1.69-3.17-2.87Zm9.43-22.09A19.86,19.86,0,1,1,60,90.74,19.86,19.86,0,0,1,79.88,70.88Z"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB