|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +Setup your testing environment |
| 7 | +=============== |
| 8 | + |
| 9 | +## Prepare your Workstation |
| 10 | + |
| 11 | +You need a set of tools to have a good testing setup. Tools you should have: |
| 12 | + |
| 13 | +* git |
| 14 | +* node (16.16.0 is the current LTS) |
| 15 | +* database (mysql 5.6+, mariaDB 10.1+, postgres 11.0+) |
| 16 | +* PHP (good to have different versions and the ability to switch) |
| 17 | +* Composer, [Installation instructions here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) |
| 18 | +* Webserver (apache 2.4+, nginx 1.18+) |
| 19 | +* Editor (PhpStorm, Visual Studio Code) |
| 20 | + |
| 21 | + |
| 22 | +## MAC OS |
| 23 | + |
| 24 | +As always there are different ways of installing the listed software. One way is the use of [Valet](https://laravel.com/docs/9.x/valet) in combination with [Homebrew](https://brew.sh/) |
| 25 | + |
| 26 | +Now as you have all tools installed you can clone the [joomla-cms repository](https://github.com/joomla/joomla-cms). |
| 27 | + |
| 28 | +1. Open a terminal |
| 29 | +2. Go into a directory on you workstation. |
| 30 | +3. clone the joomla-cms repository: ```git clone https://github.com/joomla/joomla-cms.git``` another option here is to fork the joomla-cms repo and then clone your fork. We recommend the 2nd way because then you can make changes and Pull Request directly. |
| 31 | +4. Go into the joomla-cms directory |
| 32 | +5. If you have installed valet, run ```valet link``` |
| 33 | +5. Run ```composer install``` |
| 34 | +6. Run ```npm ci``` |
| 35 | +7. Create a ```cypress.env.json``` file. This file allows to overwrite config setting from ```cypress.config.js``` |
| 36 | + |
| 37 | + Here is a example ```cypress.env.json``` |
| 38 | + |
| 39 | + ```json |
| 40 | + { |
| 41 | + "sitename": "Joomla CMS Test Local", |
| 42 | + "name": "jane doe", |
| 43 | + |
| 44 | + "username": "local-admin", |
| 45 | + "password": "joomla-17082005", |
| 46 | + "db_type": "MySQLi", |
| 47 | + "db_host": "localhost", |
| 48 | + "db_name": "test_joomla", |
| 49 | + "db_user": "root", |
| 50 | + "db_password": "password", |
| 51 | + "db_prefix": "jos_" |
| 52 | + } |
| 53 | + ``` |
| 54 | + You don't need all settings, just look what you have to change for your local environment compared to ```cypress.config.js``` |
| 55 | + |
| 56 | +8. Run ```cypress open --e2e --browser=chrome --config baseUrl=http://joomla-cms.test``` |
| 57 | + |
| 58 | + This will open two windows, one you can ignore and one to run the tests |
| 59 | + |
| 60 | + |
| 61 | +  |
| 62 | + |
| 63 | + In the following window you can select test and let them run. You need to install first. |
| 64 | + |
| 65 | +  |
| 66 | + |
| 67 | + |
| 68 | +## Windows |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +:::caution TODO |
| 74 | + |
| 75 | +This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful. |
| 76 | + |
| 77 | +::: |
0 commit comments