Merge pull request #131 from mozilla/MadalinPlayground
Correct the command to build the UI tests in the getting-started.md file
This commit is contained in:
Коммит
c9b7f2f1ec
|
@ -22,14 +22,14 @@ page][git-downloads].
|
||||||
|
|
||||||
### Clone project
|
### Clone project
|
||||||
|
|
||||||
Open a terminal and type ``git clone`` and the URL to **redash-ui-tests**:
|
Open a terminal and type `git clone` and the URL to **redash-ui-tests**:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ git clone https://github.com/mozilla/redash-ui-tests
|
$ git clone https://github.com/mozilla/redash-ui-tests
|
||||||
```
|
```
|
||||||
|
|
||||||
This will download the latest version of the source code to your local
|
This will download the latest version of the source code to your local
|
||||||
machine to a new directory named ``redash-ui-tests``.
|
machine to a new directory named `redash-ui-tests`.
|
||||||
|
|
||||||
Navigate to the project:
|
Navigate to the project:
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@ with the tests.
|
||||||
#### Redash Setup
|
#### Redash Setup
|
||||||
|
|
||||||
The redash instance must be setup before running the tests. Start the images
|
The redash instance must be setup before running the tests. Start the images
|
||||||
``docker-compose up -d`` in the root of the directory in which the project
|
`docker-compose up -d` in the root of the directory in which the project
|
||||||
was downloaded to. This will download the images if you don't have them. It
|
was downloaded to. This will download the images if you don't have them. It
|
||||||
will also start the container in the background. You can view the status of
|
will also start the container in the background. You can view the status of
|
||||||
the containers via ``docker-compose ps``. You can also stop the docker
|
the containers via `docker-compose ps`. You can also stop the docker
|
||||||
container by running ``docker-compose stop``.
|
container by running `docker-compose stop`.
|
||||||
|
|
||||||
All the following commands should also be run within the same directory that
|
All the following commands should also be run within the same directory that
|
||||||
you downloaded the project to.
|
you downloaded the project to.
|
||||||
|
@ -66,30 +66,30 @@ docker-compose run --rm server create_db
|
||||||
docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests"
|
docker-compose run --rm postgres psql -h postgres -U postgres -c "create database tests"
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Create a default user named ``rootuser`` with a password ``IAMROOT`` and
|
3. Create a default user named `rootuser` with a password `IAMROOT` and
|
||||||
an organization ``default``:
|
an organization `default`:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
docker-compose run --rm server /app/manage.py users create_root root@example.com "rootuser" --password "IAMROOT" --org default
|
docker-compose run --rm server /app/manage.py users create_root root@example.com "rootuser" --password "IAMROOT" --org default
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Create a new data source named ``ui-tests``.
|
4. Create a new data source named `ui-tests`.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
docker-compose run --rm server /app/manage.py ds new "ui-tests" --type "url" --options '{"title": "uitests"}'
|
docker-compose run --rm server /app/manage.py ds new "ui-tests" --type "url" --options '{"title": "uitests"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
You can visit ``127.0.0.1:5000``, or ``localhost:5000`` in a web browser to
|
You can visit `127.0.0.1:5000`, or `localhost:5000` in a web browser to
|
||||||
see the redash login page.
|
see the redash login page.
|
||||||
|
|
||||||
___
|
---
|
||||||
|
|
||||||
#### Docker test
|
#### Docker test
|
||||||
|
|
||||||
Build the redash-ui-tests with this command:
|
Build the redash-ui-tests with this command:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
docker build -t "redash-ui-tests:latest"
|
docker build -t "redash-ui-tests:latest" .
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run the tests:
|
Then run the tests:
|
||||||
|
@ -105,7 +105,7 @@ command
|
||||||
docker cp ui-tests:/home/user/src/report.html ./report.html
|
docker cp ui-tests:/home/user/src/report.html ./report.html
|
||||||
```
|
```
|
||||||
|
|
||||||
and open the ```report.html```, which should be located within the projects
|
and open the `report.html`, which should be located within the projects
|
||||||
root directory, in your web browser.
|
root directory, in your web browser.
|
||||||
|
|
||||||
#### Using make
|
#### Using make
|
||||||
|
@ -114,9 +114,9 @@ Redash-ui-tests include a Makefile to run setup and tests.
|
||||||
|
|
||||||
##### Make commands
|
##### Make commands
|
||||||
|
|
||||||
To setup the redash instance us:e ```make setup-redash```.
|
To setup the redash instance us:e `make setup-redash`.
|
||||||
To run the docker tests use: ```make docker-ui-tests```.
|
To run the docker tests use: `make docker-ui-tests`.
|
||||||
To run the tests using a local firefox browser use: ```make ui-tests```.
|
To run the tests using a local firefox browser use: `make ui-tests`.
|
||||||
|
|
||||||
## Break a test
|
## Break a test
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче