Skip to content

Commit 11625d5

Browse files
committed
Merge branch 'release/v3.4.8.0'
2 parents a52d919 + bafb00e commit 11625d5

File tree

7 files changed

+1358
-45
lines changed

7 files changed

+1358
-45
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Desktop.ini
2525
*.swp
2626
*~.nib
2727
*~
28+
*.travis/*
2829

2930
# Ignore mergetool files
3031
*.orig
@@ -34,7 +35,6 @@ build.properties
3435
phing-latest.phar
3536

3637
# Composer
37-
composer.lock
3838
composer.phar
3939
vendor/*
4040
tests/vendor/*

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: php
2+
php:
3+
- 5.4
4+
before_script:
5+
- composer install
6+
7+
script:
8+
- vendor/bin/robo check:codestyle

README.md

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,57 @@
99
* [Loading the Module in Codeception](loading-the-module-in-codeception)
1010

1111
## The Joomla Browser
12-
Joomla Browser with Codeception Module Functionality
12+
Joomla Browser is a Codeception.com Module. It allows to build `system tests` for a Joomla site much faster providing a set of predefined tasks.
13+
14+
In between the available functions you can find:
15+
16+
* INSTALLATION:
17+
* install joomla
18+
* install Joomla removing Installation Folder
19+
* install Joomla Multilingual Site
20+
* ADMINISTRATOR:
21+
* do administrator login
22+
* do administrator logout
23+
* set error reporting to development
24+
* search for item
25+
* check for item existence
26+
* publish a module
27+
* setting a module position and publishing it
28+
* EXTENSION MANAGER
29+
* install extension from Folder
30+
* install extension from url
31+
* enable plugin
32+
* uninstall extension
33+
* search result plugin name
34+
* FRONTEND:
35+
* do frontend login
36+
* ADMINISTRATOR USER INTERFACE:
37+
* select option in chosen
38+
* select Option In Radio Field
39+
* select Multiple Options In Chosen
40+
* OTHERS:
41+
* check for php notices or warnings
42+
43+
44+
The Joomla Browser is constantly evolving and more methods are being added every month.
45+
To find a full list of them check the public methods at: https://github.com/joomla-projects/joomla-browser/blob/develop/src/JoomlaBrowser.php
46+
47+
48+
## Joomla Browser in action
49+
If you want to see a working example of JoomlaBrowser check weblinks tests: https://github.com/joomla-extensions/weblinks#tests
1350

1451
## Using Instructions
15-
Update Composer.json file in your project, adding
52+
Update Composer.json file in your project, and download
1653

1754
### Download
1855

1956
```
20-
"require" : "joomla-projects/joomla-browser": "dev-develop"
21-
```
22-
then do a
23-
```
24-
composer update
57+
composer require joomla-projects/joomla-browser:dev-develop
2558
```
2659

2760
### Loading the Module in Codeception
2861

29-
Finally Make changes in Acceptance.suite.yml add JoomlaBrowser as a Module
62+
Finally make the following changes in Acceptance.suite.yml to add JoomlaBrowser as a Module.
3063

3164
Your original `acceptance.suite.yml`probably looks like:
3265

@@ -46,7 +79,7 @@ modules:
4679
...
4780
```
4881
49-
You are asked to remove WebDriver module and change it by the JoomlaBrowser module:
82+
You should remove the WebDriver module and replace it with the JoomlaBrowser module:
5083
5184
```yaml
5285
config:
@@ -72,3 +105,13 @@ You are asked to remove WebDriver module and change it by the JoomlaBrowser modu
72105
AcceptanceHelper:
73106
...
74107
```
108+
109+
## Tools
110+
Joomla Browser comes with a set of tools added via robo.li
111+
112+
### Code Style Checker
113+
To check automatically the code style execute the following commands in your Terminal window at the root of the repository:
114+
115+
- `$ composer install`
116+
- `$ vendor/bin/robo`
117+
- `$ vendor/bin/robo check:codestyle`

RoboFile.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/**
4+
* This is project's console commands configuration for Robo task runner.
5+
*
6+
* @see http://robo.li/
7+
*/
8+
class RoboFile extends \Robo\Tasks
9+
{
10+
// Load tasks from composer, see composer.json
11+
use \joomla_projects\robo\loadTasks;
12+
13+
private $extension = '';
14+
15+
/**
16+
* Set the Execute extension for Windows Operating System
17+
*
18+
* @return void
19+
*/
20+
private function setExecExtension()
21+
{
22+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
23+
{
24+
$this->extension = '.exe';
25+
}
26+
}
27+
28+
/**
29+
* Check the code style of the project against a passed sniffers using PHP_CodeSniffer_CLI
30+
*
31+
* @param string $sniffersPath Path to the sniffers. If not provided Joomla Coding Standards will be used.
32+
*/
33+
public function checkCodestyle($sniffersPath = null)
34+
{
35+
if (is_null($sniffersPath))
36+
{
37+
$this->say('Downloading Joomla Coding Standards Sniffers');
38+
$this->_exec("git $this->extension clone -b master --single-branch --depth 1 https://github.com/joomla/coding-standards.git .travis/phpcs/Joomla");
39+
$sniffersPath = __DIR__ . '/.travis/phpcs/Joomla';
40+
}
41+
42+
$this->taskCheckCodeStyle()
43+
->inspect(__DIR__ . '/src')
44+
->dontStopOnFail(true)
45+
->standard($sniffersPath)
46+
->run();
47+
}
48+
}

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.3.0",
19-
"codeception/codeception": "2.*"
18+
"php": ">=5.3.0"
19+
},
20+
"require-dev": {
21+
"codegyre/robo": "^0.5.3",
22+
"joomla-projects/robo": "dev-master"
2023
},
2124
"autoload": {
2225
"psr-4": {

0 commit comments

Comments
 (0)