From a0d68ab93bf5f0785218f7fb464a8d5988969f25 Mon Sep 17 00:00:00 2001 From: Yves Hoppe Date: Wed, 30 Sep 2015 19:29:14 +0200 Subject: [PATCH] [tests] Added integration tests and moved to codeception 2.1 This is a clean version of pull #94 --- .gitignore | 2 +- .travis.yml | 2 +- RoboFile.php | 210 +- codeception.yml | 7 - composer.json | 6 +- composer.lock | 2157 +++++++++++++++++ tests/_data/scenarios/acceptance.txt | 203 ++ tests/_support/Step/Acceptance/weblink.php | 40 + tests/_support/_generated/.gitkeep | 0 tests/acceptance.suite.dist.yml | 2 +- .../AdministratorCategoriesCest.php | 138 -- tests/acceptance/MenuCest.php | 57 - tests/acceptance/_bootstrap.php | 2 + .../AdministratorCategoriesCest.php | 136 ++ .../AdministratorWeblinksCest.php | 34 +- .../frontend/FrontendWeblinksCest.php | 53 + .../InstallWeblinksCest.php} | 10 +- 17 files changed, 2707 insertions(+), 352 deletions(-) create mode 100644 composer.lock create mode 100644 tests/_data/scenarios/acceptance.txt create mode 100644 tests/_support/Step/Acceptance/weblink.php create mode 100644 tests/_support/_generated/.gitkeep delete mode 100644 tests/acceptance/AdministratorCategoriesCest.php delete mode 100644 tests/acceptance/MenuCest.php create mode 100644 tests/acceptance/administrator/AdministratorCategoriesCest.php rename tests/acceptance/{ => administrator}/AdministratorWeblinksCest.php (81%) create mode 100644 tests/acceptance/frontend/FrontendWeblinksCest.php rename tests/acceptance/{01-InstallWeblinksCest.php => install/InstallWeblinksCest.php} (82%) diff --git a/.gitignore b/.gitignore index bfa7fac..29f0600 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,6 @@ phing-latest.phar /Gemfile.lock # composer -composer.lock composer.phar vendor/* @@ -50,6 +49,7 @@ robo.phar # Test related files tests/acceptance.suite.yml tests/*/*Tester.php +tests/_support/_generated/*TesterActions.php tests/joomla-cms3* tests/_output* selenium-server-standalone.jar diff --git a/.travis.yml b/.travis.yml index 92d4a11..2d67c21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_script: - sudo apt-get install fluxbox -y --force-yes - fluxbox & - sleep 3 # give fluxbox some time to start -- composer update +- composer install script: - mv tests/acceptance.suite.dist.yml tests/acceptance.suite.yml diff --git a/RoboFile.php b/RoboFile.php index eb66bca..02dfb6a 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -42,76 +42,37 @@ class RoboFile extends \Robo\Tasks { $this->setExecExtension(); - // Get Joomla Clean Testing sites - if (is_dir('tests/joomla-cms3')) - { - $this->taskDeleteDir('tests/joomla-cms3')->run(); - } + $this->createTestingSite(); - $this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/joomla-cms3'); - $this->say('Joomla CMS site created at tests/joomla-cms3'); + $this->getComposer(); - if (!$seleniumPath) - { - if (!file_exists('selenium-server-standalone.jar')) - { - $this->say('Downloading Selenium Server, this may take a while.'); + $this->taskComposerInstall()->run(); - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') - { - $this->_exec('curl.exe -sS http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar > selenium-server-standalone.jar'); - } - else - { - $this->taskExec('wget') - ->arg('http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar') - ->arg('-O selenium-server-standalone.jar') - ->printed(false) - ->run(); - } - } + $this->runSelenium(); - $seleniumPath = 'selenium-server-standalone.jar'; - } - - if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') - { - $seleniumPath = "java -jar $seleniumPath >> selenium.log 2>&1 &"; - } - else - { - $seleniumPath = "START java.exe -jar .\\" . $seleniumPath; - } - - // Make sure we have Composer - if (!file_exists('./composer.phar')) - { - $this->_exec('curl' . $this->extension . ' -sS https://getcomposer.org/installer | php'); - } - - $this->taskComposerUpdate()->run(); - - // Running Selenium server - $this->_exec($seleniumPath); - - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') - { - sleep(10); - } - else - { - $this->taskWaitForSeleniumStandaloneServer() - ->run() - ->stopOnFail(); - } - - // Loading Symfony Command and running with passed argument $this->_exec('php' . $this->extension . ' vendor/bin/codecept build'); $this->taskCodecept() - ->suite($suite) ->arg('--steps') ->arg('--debug') + ->arg('--fail-fast') + ->arg('tests/acceptance/install/') + ->run() + ->stopOnFail(); + + $this->taskCodecept() + ->arg('--steps') + ->arg('--debug') + ->arg('--fail-fast') + ->arg('tests/acceptance/administrator/') + ->run() + ->stopOnFail(); + + $this->taskCodecept() + ->arg('--steps') + ->arg('--debug') + ->arg('--fail-fast') + ->arg('tests/acceptance/frontend/') ->run() ->stopOnFail(); @@ -139,63 +100,50 @@ class RoboFile extends \Robo\Tasks * * @return mixed */ - public function runTest($seleniumPath = null, $pathToTestFile = null, $suite = 'acceptance') + public function runTest($pathToTestFile = null, $suite = 'acceptance') { - if (!$seleniumPath) - { - if (!file_exists('selenium-server-standalone.jar')) - { - $this->say('Downloading Selenium Server, this may take a while.'); - $this->taskExec('wget') - ->arg('http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar') - ->arg('-O selenium-server-standalone.jar') - ->printed(false) - ->run(); - } - - $seleniumPath = 'selenium-server-standalone.jar'; - } - - // Make sure we have Composer - if (!file_exists('./composer.phar')) - { - $this->_exec('curl -sS https://getcomposer.org/installer | php'); - } - $this->taskComposerUpdate()->run(); - - // Running Selenium server - $this->_exec("java -jar $seleniumPath > selenium-errors.log 2>selenium.log &"); - - $this->taskWaitForSeleniumStandaloneServer() - ->run() - ->stopOnFail(); + $this->runSelenium(); // Make sure to Run the Build Command to Generate AcceptanceTester $this->_exec("php vendor/bin/codecept build"); if (!$pathToTestFile) { - $tests = array(); $this->say('Available tests in the system:'); - $filesInSuite = scandir(getcwd() . '/tests/' . $suite); + + $iterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator( + 'tests/' . $suite, + RecursiveDirectoryIterator::SKIP_DOTS + ), + RecursiveIteratorIterator::SELF_FIRST + ); + + $tests = array(); + + $iterator->rewind(); $i = 1; - foreach ($filesInSuite as $file) + while ($iterator->valid()) { - // Make sure the file is a Test file - if (strripos($file, 'cept.php') || strripos($file, 'cest.php')) + if (strripos($iterator->getSubPathName(), 'cept.php') + || strripos($iterator->getSubPathName(), 'cest.php')) { - $tests[$i] = $file; - $this->say('[' . $i . '] ' . $file); + $this->say('[' . $i . '] ' . $iterator->getSubPathName()); + $tests[$i] = $iterator->getSubPathName(); $i++; } + + $iterator->next(); } $this->say(''); - $testNumber = $this->ask('Type the number of the test in the list that you want to run...'); - $pathToTestFile = "tests/$suite/" . $tests[$testNumber]; + $testNumber = $this->ask('Type the number of the test in the list that you want to run...'); + $test = $tests[$testNumber]; } + $pathToTestFile = 'tests/' . $suite . '/' . $test; + $this->taskCodecept() ->test($pathToTestFile) ->arg('--steps') @@ -205,28 +153,6 @@ class RoboFile extends \Robo\Tasks // Kill selenium server // $this->_exec('curl http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer'); - - $this->say('Printing Selenium Log files'); - $this->say('------ selenium-errors.log (start) ---------'); - $seleniumErrors = file_get_contents('selenium-errors.log'); - - if ($seleniumErrors) - { - $this->say(file_get_contents('selenium-errors.log')); - } - else - { - $this->say('no errors were found'); - } - $this->say('------ selenium-errors.log (end) -----------'); - - /* - // Uncomment if you need to debug issues in selenium - $this->say(''); - $this->say('------ selenium.log (start) -----------'); - $this->say(file_get_contents('selenium.log')); - $this->say('------ selenium.log (end) -----------'); - */ } /** @@ -243,4 +169,46 @@ class RoboFile extends \Robo\Tasks $this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/joomla-cms3'); $this->say('Joomla CMS site created at tests/joomla-cms3'); } + + /** + * Runs Selenium Standalone Server. + * + * @return void + */ + public function runSelenium() + { + if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') + { + $this->_exec("vendor/bin/selenium-server-standalone >> selenium.log 2>&1 &"); + } + else + { + $this->_exec("START java.exe -jar .\\vendor\\joomla-projects\\selenium-server-standalone\\bin\\selenium-server-standalone.jar"); + } + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + { + sleep(10); + } + else + { + $this->taskWaitForSeleniumStandaloneServer() + ->run() + ->stopOnFail(); + } + } + + /** + * Downloads Composer + * + * @return void + */ + private function getComposer() + { + // Make sure we have Composer + if (!file_exists('./composer.phar')) + { + $this->_exec('curl --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php'); + } + } } diff --git a/codeception.yml b/codeception.yml index 306e739..b9a584d 100644 --- a/codeception.yml +++ b/codeception.yml @@ -8,10 +8,3 @@ settings: bootstrap: _bootstrap.php colors: true memory_limit: 1024M -modules: - config: - Db: - dsn: '' - user: '' - password: '' - dump: tests/_data/dump.sql diff --git a/composer.json b/composer.json index 00b70ea..515565b 100644 --- a/composer.json +++ b/composer.json @@ -6,9 +6,11 @@ "php": ">=5.3.10" }, "require-dev": { - "codeception/codeception": "2.0.13", + "codeception/codeception": "~2.1", "joomla-projects/joomla-browser": "dev-develop", "codegyre/robo": "~0.5", - "joomla-projects/robo": "dev-master" + "joomla-projects/robo": "dev-master", + "joomla-projects/selenium-server-standalone": "v2.47.1", + "fzaninotto/faker": "^1.5" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..d3323b6 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2157 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "a92f2be1ccb2397e6cc71bcb0287cff5", + "packages": [], + "packages-dev": [ + { + "name": "codeception/codeception", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Codeception.git", + "reference": "521adbb2ee34e9debdd8508a2c41ab2b5c2f042b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/521adbb2ee34e9debdd8508a2c41ab2b5c2f042b", + "reference": "521adbb2ee34e9debdd8508a2c41ab2b5c2f042b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "facebook/webdriver": ">=1.0.1", + "guzzlehttp/guzzle": ">=4.0|<7.0", + "guzzlehttp/psr7": "~1.0", + "php": ">=5.4.0", + "phpunit/phpunit": "~4.8.0", + "symfony/browser-kit": "~2.4", + "symfony/console": "~2.4", + "symfony/css-selector": "~2.4", + "symfony/dom-crawler": "~2.4,!=2.4.5", + "symfony/event-dispatcher": "~2.4", + "symfony/finder": "~2.4", + "symfony/yaml": "~2.4" + }, + "require-dev": { + "codeception/specify": "~0.3", + "facebook/php-sdk-v4": "~4.0", + "flow/jsonpath": "~0.2", + "monolog/monolog": "~1.8", + "pda/pheanstalk": "~2.0", + "videlalvaro/php-amqplib": "~2.4" + }, + "suggest": { + "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", + "codeception/specify": "BDD-style code blocks", + "codeception/verify": "BDD-style assertions", + "monolog/monolog": "Log test steps", + "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." + }, + "bin": [ + "codecept" + ], + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Codeception\\": "src\\Codeception", + "Codeception\\Extension\\": "ext" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" + } + ], + "description": "BDD-style testing framework", + "homepage": "http://codeception.com/", + "keywords": [ + "BDD", + "TDD", + "acceptance testing", + "functional testing", + "unit testing" + ], + "time": "2015-08-09 13:48:55" + }, + { + "name": "codegyre/robo", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/Codegyre/Robo.git", + "reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codegyre/Robo/zipball/10aa223f6d1db182dc81d723bf1545dfc6ff380d", + "reference": "10aa223f6d1db182dc81d723bf1545dfc6ff380d", + "shasum": "" + }, + "require": { + "henrikbjorn/lurker": "1.0.*@dev", + "php": ">=5.4.0", + "symfony/console": "~2.5", + "symfony/filesystem": "~2.5", + "symfony/finder": "~2.5", + "symfony/process": "~2.5" + }, + "require-dev": { + "codeception/aspect-mock": "0.5.*", + "codeception/base": "~2.1", + "codeception/verify": "0.2.*", + "natxet/cssmin": "~3.0", + "patchwork/jsqueeze": "~1.0" + }, + "bin": [ + "robo" + ], + "type": "library", + "autoload": { + "psr-4": { + "Robo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + } + ], + "description": "Modern task runner", + "time": "2015-08-31 17:35:30" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "facebook/webdriver", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/facebook/php-webdriver.git", + "reference": "fe1bbbc5dde804d08a8593f1d9d0d3b05f5c84f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/fe1bbbc5dde804d08a8593f1d9d0d3b05f5c84f5", + "reference": "fe1bbbc5dde804d08a8593f1d9d0d3b05f5c84f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.19" + }, + "require-dev": { + "phpunit/phpunit": "4.6.*" + }, + "suggest": { + "phpdocumentor/phpdocumentor": "2.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facebook\\WebDriver\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "A PHP client for WebDriver", + "homepage": "https://github.com/facebook/php-webdriver", + "keywords": [ + "facebook", + "php", + "selenium", + "webdriver" + ], + "time": "2015-08-12 20:21:31" + }, + { + "name": "fzaninotto/faker", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "suggest": { + "ext-intl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2015-05-29 06:29:14" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "66fd14b4d0b8f2389eaf37c5458608c7cb793a81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/66fd14b4d0b8f2389eaf37c5458608c7cb793a81", + "reference": "66fd14b4d0b8f2389eaf37c5458608c7cb793a81", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "~1.0", + "guzzlehttp/psr7": "~1.1", + "php": ">=5.5.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0", + "psr/log": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2015-09-08 17:36:26" + }, + { + "name": "guzzlehttp/promises", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "97fe7210def29451ec74923b27e552238defd75a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/97fe7210def29451ec74923b27e552238defd75a", + "reference": "97fe7210def29451ec74923b27e552238defd75a", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2015-08-15 19:37:21" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "4ef919b0cf3b1989523138b60163bbcb7ba1ff7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/4ef919b0cf3b1989523138b60163bbcb7ba1ff7e", + "reference": "4ef919b0cf3b1989523138b60163bbcb7ba1ff7e", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2015-08-15 19:32:36" + }, + { + "name": "henrikbjorn/lurker", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/henrikbjorn/Lurker.git", + "reference": "a020d45b3bc37810aeafe27343c51af8a74c9419" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/henrikbjorn/Lurker/zipball/a020d45b3bc37810aeafe27343c51af8a74c9419", + "reference": "a020d45b3bc37810aeafe27343c51af8a74c9419", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/config": "~2.2", + "symfony/event-dispatcher": "~2.2" + }, + "suggest": { + "ext-inotify": ">=0.1.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Lurker": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Henrik Bjornskov", + "email": "henrik@bjrnskov.dk", + "homepage": "http://henrik.bjrnskov.dk" + }, + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Yaroslav Kiliba", + "email": "om.dattaya@gmail.com" + } + ], + "description": "Resource Watcher.", + "keywords": [ + "filesystem", + "resource", + "watching" + ], + "time": "2013-05-24 06:47:29" + }, + { + "name": "joomla-projects/joomla-browser", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/joomla-projects/joomla-browser.git", + "reference": "650962ebb7fb2ff25b09b71a71147e28bb8939f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-projects/joomla-browser/zipball/650962ebb7fb2ff25b09b71a71147e28bb8939f9", + "reference": "650962ebb7fb2ff25b09b71a71147e28bb8939f9", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "codegyre/robo": "^0.5.3", + "joomla-projects/robo": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codeception\\Module\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Puneet Kala", + "email": "puneet.kala@community.joomla.org" + }, + { + "name": "Javier Gomez", + "email": "javier.gomez@community.joomla.org" + } + ], + "description": "joomla-browser Codeception Module", + "homepage": "https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception", + "keywords": [ + "BDD", + "TDD", + "acceptance testing", + "joomla" + ], + "time": "2015-09-28 14:59:15" + }, + { + "name": "joomla-projects/robo", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/joomla-projects/robo.git", + "reference": "8a9c72f61696a4f288ede8212a0e7c7c47eda360" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-projects/robo/zipball/8a9c72f61696a4f288ede8212a0e7c7c47eda360", + "reference": "8a9c72f61696a4f288ede8212a0e7c7c47eda360", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "joomla_projects\\robo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Javier", + "email": "javier.gomez@community.joomla.org" + } + ], + "description": "Robo tasks for Joomla Quality Assurance", + "keywords": [ + "BDD", + "robo", + "task" + ], + "time": "2015-08-07 16:24:43" + }, + { + "name": "joomla-projects/selenium-server-standalone", + "version": "v2.47.1", + "source": { + "type": "git", + "url": "https://github.com/joomla-projects/selenium-server-standalone.git", + "reference": "ee9d37f7bab058c010a9109803e23d6198329d22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/ee9d37f7bab058c010a9109803e23d6198329d22", + "reference": "ee9d37f7bab058c010a9109803e23d6198329d22", + "shasum": "" + }, + "bin": [ + "bin/selenium-server-standalone" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache 2.0" + ], + "authors": [ + { + "name": "Javier Gómez", + "email": "javier.gomez@community.joomla.org" + } + ], + "description": "Composer distribution of Selenium Server Standalone, the browser automation framework. Adds a executable to your composer bin directory.", + "homepage": "https://github.com/joomla-projects/selenium-server-standalone", + "keywords": [ + "selenium", + "testing" + ], + "time": "2015-09-30 10:26:45" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-08-13 10:07:40" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f", + "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-09-14 06:51:16" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2015-06-21 08:01:12" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "73fad41adb5b7bc3a494bb930d90648df1d5e74b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/73fad41adb5b7bc3a494bb930d90648df1d5e74b", + "reference": "73fad41adb5b7bc3a494bb930d90648df1d5e74b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2015-09-20 12:56:44" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "5e2645ad49d196e020b85598d7c97e482725786a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a", + "reference": "5e2645ad49d196e020b85598d7c97e482725786a", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-08-19 09:14:08" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-02-22 15:13:53" + }, + { + "name": "sebastian/environment", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", + "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2015-08-03 06:14:51" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" + }, + { + "name": "sebastian/global-state", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2014-10-06 09:23:50" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", + "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-06-21 08:04:50" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "1.5.6", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.1.2" + }, + "suggest": { + "phpunit/php-timer": "dev-master" + }, + "bin": [ + "scripts/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-phpcs-fixer": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/CommentParser/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2014-12-04 22:32:15" + }, + { + "name": "symfony/browser-kit", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "277a2457776d4cc25706fbdd9d1e4ab2dac884e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/277a2457776d4cc25706fbdd9d1e4ab2dac884e4", + "reference": "277a2457776d4cc25706fbdd9d1e4ab2dac884e4", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/dom-crawler": "~2.0,>=2.0.5" + }, + "require-dev": { + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.0,>=2.0.5" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "https://symfony.com", + "time": "2015-09-06 08:36:38" + }, + { + "name": "symfony/config", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/9698fdf0a750d6887d5e7729d5cf099765b20e61", + "reference": "9698fdf0a750d6887d5e7729d5cf099765b20e61", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/filesystem": "~2.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2015-09-21 15:02:29" + }, + { + "name": "symfony/console", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "06cb17c013a82f94a3d840682b49425cd00a2161" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/06cb17c013a82f94a3d840682b49425cd00a2161", + "reference": "06cb17c013a82f94a3d840682b49425cd00a2161", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2015-09-25 08:32:23" + }, + { + "name": "symfony/css-selector", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "abe19cc0429a06be0c133056d1f9859854860970" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/abe19cc0429a06be0c133056d1f9859854860970", + "reference": "abe19cc0429a06be0c133056d1f9859854860970", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2015-09-22 13:49:29" + }, + { + "name": "symfony/dom-crawler", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "2e185ca136399f902b948694987e62c80099c052" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2e185ca136399f902b948694987e62c80099c052", + "reference": "2e185ca136399f902b948694987e62c80099c052", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/css-selector": "~2.3", + "symfony/phpunit-bridge": "~2.7" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2015-09-20 21:13:58" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae4dcc2a8d3de98bd794167a3ccda1311597c5d9", + "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.6", + "symfony/expression-language": "~2.6", + "symfony/phpunit-bridge": "~2.7", + "symfony/stopwatch": "~2.3" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2015-09-22 13:49:29" + }, + { + "name": "symfony/filesystem", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a17f8a17c20e8614c15b8e116e2f4bcde102cfab", + "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2015-09-09 17:42:36" + }, + { + "name": "symfony/finder", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "8262ab605973afbb3ef74b945daabf086f58366f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/8262ab605973afbb3ef74b945daabf086f58366f", + "reference": "8262ab605973afbb3ef74b945daabf086f58366f", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2015-09-19 19:59:23" + }, + { + "name": "symfony/process", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/b27c8e317922cd3cdd3600850273cf6b82b2e8e9", + "reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2015-09-19 19:59:23" + }, + { + "name": "symfony/yaml", + "version": "v2.7.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/31cb2ad0155c95b88ee55fe12bc7ff92232c1770", + "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2015-09-14 14:14:09" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "joomla-projects/joomla-browser": 20, + "joomla-projects/robo": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.3.10" + }, + "platform-dev": [] +} diff --git a/tests/_data/scenarios/acceptance.txt b/tests/_data/scenarios/acceptance.txt new file mode 100644 index 0000000..61bf0b7 --- /dev/null +++ b/tests/_data/scenarios/acceptance.txt @@ -0,0 +1,203 @@ +I WANT TO TEST CATEGORY CREATION IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Categories page in /administrator/" +I am on page "administrator/index.php?option=com_categories&extension=com_weblinks" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "see categories page" +I check for php notices or warnings "" +I am going to "try to save a category with a filled title" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]" +I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']" +I fill field(['id' => 'jform_title'], 'automated testing' . rand "1"," 100)" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.apply')\"]"]" +I expect to "see a success message after saving the category" +I see "Category successfully saved"," ['id' => 'system-message-container']" + +I WANT TO TEST CATEGORY CREATION IN /ADMINISTRATOR/ WITHOUT TITLE + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Categories page in /administrator/" +I am on page "administrator/index.php?option=com_categories&extension=com_weblinks" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "see categories page" +I am going to "try to save a category with empty title and it should fail" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]" +I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.apply')\"]"]" +I expect to "see an error when trying to save a category without title" +I see "Invalid field: Title"," ['id' => 'system-message-container']" + +I WANT TO TEST CATEGORY PUBLISHING IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Categories page in /administrator/" +I am on page "administrator/index.php?option=com_categories&extension=com_weblinks" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "see categories page" +I check for php notices or warnings "" +I am going to "try to save a category with a filled title" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]" +I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']" +I fill field(['id' => 'jform_title'], 'automated testing pub' . rand "1"," 100)" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.save')\"]"]" +I expect to "see a success message after saving the category" +I see "Category successfully saved"," ['id' => 'system-message-container']" +I am going to "Search for automated testing" +I fill field "['xpath' => "//input[@id=\"filter_search\"]"]"," "automated testing pub" . "\n"" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I am going to "Select the first weblink" +I click "['xpath' => "//input[@id=\"cb0\"]"]" +I am going to "try to publish a weblink category" +I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.publish')}\"]"]" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "see a success message after publishing the category" +I see "1 category successfully published."," ['id' => 'system-message-container']" + +I WANT TO TEST CATEGORY UNPUBLISHING IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Categories page in /administrator/" +I am on page "administrator/index.php?option=com_categories&extension=com_weblinks" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "see categories page" +I check for php notices or warnings "" +I am going to "try to save a category with a filled title" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]" +I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']" +I fill field(['id' => 'jform_title'], 'automated testing unpub' . rand "1"," 100)" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.save')\"]"]" +I expect to "see a success message after saving the category" +I see "Category successfully saved"," ['id' => 'system-message-container']" +I am going to "Search for automated testing" +I fill field "['xpath' => "//input[@id=\"filter_search\"]"]"," "automated testing unpub" . "\n"" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I am going to "Select the first weblink" +I click "['xpath' => "//input[@id=\"cb0\"]"]" +I am going to "Try to publish a weblink category" +I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.publish')}\"]"]" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "See a success message after publishing the category" +I see "1 category successfully published."," ['id' => 'system-message-container']" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I am going to "Select the first weblink" +I click "['xpath' => "//input[@id=\"cb0\"]"]" +I am going to "Try to unpublish a weblink category" +I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.unpublish')}\"]"]" +I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']" +I expect to "See a success message after unpublishing the category" +I see "1 category successfully unpublished"," ['id' => 'system-message-container']" + +I WANT TO TEST WEBLINK CREATION IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Weblinks page in /administrator/" +I am on page "administrator/index.php?option=com_weblinks" +I wait for text "Web Links"," '30"," ['css' => 'h1']" +I expect to "see weblinks page" +I check for php notices or warnings "" +I am going to "try to save a weblink with a filled title and URL" +I click "New" +I wait for text "Web Link: New"," '30"," ['css' => 'h1']" +I fill field "['id' => 'jform_title']"," $this->title" +I fill field "['id' => 'jform_url']"," $this->url" +I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "weblink.save')\"]"]" +I wait for text "Web Links"," '30"," ['css' => 'h1']" +I expect to "see a success message and the weblink added after saving the weblink" +I see "Web link successfully saved"," ['id' => 'system-message-container']" +I see "$this->title"," ['id' => 'weblinkList']" + +I WANT TO TEST WEBLINK REMOVAL IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Weblinks page in /administrator/" +I am on page "administrator/index.php?option=com_weblinks" +I wait for text "Web Links","30","['css' => 'h1']" +I expect to "see weblinks page" +I am going to "Search the just saved weblink" +I search for item "$this->title" +I wait for text "Web Links","30","['css' => 'h1']" +I am going to "Delete the just saved weblink" +I check all results "" +I click(['xpath'=> "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "weblinks.trash')}\"]"]" +I wait for text "Web Links","30","['css' => 'h1']" +I expect to "see a success message and the weblink removed from the list" +I see "Web link successfully trashed","['id' => 'system-message-container']" +I cant see "$this->title","['id' => 'weblinkList']" + +I WANT TO TEST WEBLINK REMOVAL IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Weblinks page in /administrator/" +I am on page "administrator/index.php?option=com_weblinks" +I wait for text "Web Links","30","['css' => 'h1']" +I expect to "see weblinks page" +I select option in chosen "- Select Status -"," 'Trashed" +I am going to "Search the just saved weblink" +I search for item "$this->title" +I wait for text "Web Links","30","['css' => 'h1']" +I am going to "Delete the just saved weblink" +I check all results "" +I click "['xpath'=> '//div[@id="toolbar-delete"]/button']" +I wait for text "Web Links","30","['css' => 'h1']" +I expect to "see a success message and the weblink removed from the list" +I see "1 web link successfully deleted.","['id' => 'system-message-container']" +I cant see "$this->title","['id' => 'weblinkList']" + +I WANT TO TEST WEBLINK CREATION WITHOUT TITLE FAILS IN /ADMINISTRATOR/ + +I am "Administrator" +I do administrator login "" +I am going to "Navigate to Weblinks page in /administrator/" +I am on page "administrator/index.php?option=com_weblinks" +I wait for text "Web Links","30","['css' => 'h1']" +I expect to "see weblinks page" +I check for php notices or warnings "" +I am going to "try to save a weblink with empty title and it should fail" +I click(['xpath'=> "//button[@onclick=\"joomla.submitbutton "weblink.add')\"]"]" +I wait for text "Web Link: New","30","['css' => 'h1']" +I click(['xpath'=> "//button[@onclick=\"joomla.submitbutton "weblink.apply')\"]"]" +I expect to "see an error when trying to save a weblink without title and without URL" +I see "Invalid field: Title","['id' => 'system-message-container']" +I see "Invalid field: URL","['id' => 'system-message-container']" + +I WANT TO TEST LISTING A CATEGORY OF WEBLINKS IN FRONTEND + +I am "Administrator" +I do administrator login "" +I create weblink "$this->title"," $this->url" +I create menu item "$this->menuItem"," 'Weblinks"," 'List All Web Link Categories"," 'Main Menu" +I comment "I want to check if the menu entry exists in the frontend" +I am on page "index.php?option=com_weblinks" +I expect to "see weblink categories" +I wait for text "Uncategorised","30"," ['css' => 'h3']" +I check for php notices or warnings "" +I comment "I open the uncategorised Weblink Category" +I click "['link' => 'Uncategorised']" +I wait for text "Uncategorised","30"," ['css' => 'h2']" +I expect to "see the weblink we created" +I see element "['link' => $this->title]" +I see element "['xpath' => "//a[@href='$this->url']"]" + +I WANT TO INSTALL JOOMLA + +I am "Administrator" +I install joomla "" +I do administrator login "" +I set error reporting to development "" + +I WANT TO INSTALL WEBLINKS + +I do administrator login "" +I comment('get weblinks repository folder from acceptance.suite.yml "see _support/AcceptanceHelper.php)" +I get configuration "repo_folder" +I install extension from folder "$path . 'src/com_weblinks/" +I do administrator logout "" + diff --git a/tests/_support/Step/Acceptance/weblink.php b/tests/_support/Step/Acceptance/weblink.php new file mode 100644 index 0000000..a0e35ec --- /dev/null +++ b/tests/_support/Step/Acceptance/weblink.php @@ -0,0 +1,40 @@ +comment('I navigate to Weblinks page in /administrator/'); + $I->amOnPage('administrator/index.php?option=com_weblinks'); + $I->waitForText('Web Links', '30', ['css' => 'h1']); + $I->comment('I see weblinks page'); + + $I->comment('I try to save a weblink with a filled title and URL'); + $I->click('New'); + $I->waitForText('Web Link: New', '30', ['css' => 'h1']); + $I->fillField(['id' => 'jform_title'], $title); + $I->fillField(['id' => 'jform_url'], $url); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.save')\"]"]); + $I->waitForText('Web link successfully saved', '30', ['id' => 'system-message-container']); + } +} \ No newline at end of file diff --git a/tests/_support/_generated/.gitkeep b/tests/_support/_generated/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/acceptance.suite.dist.yml b/tests/acceptance.suite.dist.yml index 8ca589d..44770cb 100644 --- a/tests/acceptance.suite.dist.yml +++ b/tests/acceptance.suite.dist.yml @@ -28,7 +28,7 @@ modules: database host: 'localhost' # place where the Application is Hosted #server Address database user: 'root' # MySQL Server user ID, usually root database password: '' # MySQL Server password, usually empty or root - database name: 'testweblinks' # DB Name, at the Server + database name: 'test_weblinks' # DB Name, at the Server database type: 'mysqli' # type in lowercase one of the options: MySQL\MySQLi\PDO database prefix: 'jos_' # DB Prefix for tables install sample data: 'no' # Do you want to Download the Sample Data Along with Joomla Installation, then keep it Yes diff --git a/tests/acceptance/AdministratorCategoriesCest.php b/tests/acceptance/AdministratorCategoriesCest.php deleted file mode 100644 index 04f0810..0000000 --- a/tests/acceptance/AdministratorCategoriesCest.php +++ /dev/null @@ -1,138 +0,0 @@ -am('Administrator'); - $I->wantToTest('Category creation in /administrator/'); - - $I->doAdministratorLogin(); - - $I->amGoingTo('Navigate to Categories page in /administrator/'); - $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('see categories page'); - $I->checkForPhpNoticesOrWarnings(); - - $I->amGoingTo('try to save a category with a filled title'); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); - $I->waitForText('Category Manager: Add A New Weblinks Category','30',['css' => 'h1']); - $I->fillField(['id' => 'jform_title'],'automated testing' . rand(1,100)); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.apply')\"]"]); - $I->expectTo('see a success message after saving the category'); - $I->see('Category successfully saved',['id' => 'system-message-container']); - } - - public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I) - { - $I->am('Administrator'); - $I->wantToTest('Category creation in /administrator/ without title'); - - $I->doAdministratorLogin(); - - $I->amGoingTo('Navigate to Categories page in /administrator/'); - $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('see categories page'); - - $I->amGoingTo('try to save a category with empty title and it should fail'); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); - $I->waitForText('Category Manager: Add A New Weblinks Category','30',['css' => 'h1']); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.apply')\"]"]); - $I->expectTo('see an error when trying to save a category without title'); - $I->see('Invalid field: Title',['id' => 'system-message-container']); - } - - public function administratorPublishWeblink(AcceptanceTester $I) - { - $I->am('Administrator'); - $I->wantToTest('Category publishing in /administrator/'); - - $I->doAdministratorLogin(); - - $I->amGoingTo('Navigate to Categories page in /administrator/'); - $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('see categories page'); - $I->checkForPhpNoticesOrWarnings(); - - $I->amGoingTo('try to save a category with a filled title'); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); - $I->waitForText('Category Manager: Add A New Weblinks Category','30',['css' => 'h1']); - $I->fillField(['id' => 'jform_title'],'automated testing pub' . rand(1,100)); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.save')\"]"]); - - $I->expectTo('see a success message after saving the category'); - $I->see('Category successfully saved',['id' => 'system-message-container']); - - $I->amGoingTo('Search for automated testing'); - $I->fillField(['xpath'=> "//input[@id=\"filter_search\"]"], "automated testing pub" . "\n"); - - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->amGoingTo('Select the first weblink'); - $I->click(['xpath'=> "//input[@id=\"cb0\"]"]); - - $I->amGoingTo('try to publish a weblink category'); - $I->click(['xpath'=> "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.publish')}\"]"]); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('see a success message after publishing the category'); - $I->see('1 category successfully published.',['id' => 'system-message-container']); - } - - public function administratorUnpublishWeblink(AcceptanceTester $I) - { - $I->am('Administrator'); - $I->wantToTest('Category unpublishing in /administrator/'); - - $I->doAdministratorLogin(); - - $I->amGoingTo('Navigate to Categories page in /administrator/'); - $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('see categories page'); - $I->checkForPhpNoticesOrWarnings(); - - $I->amGoingTo('try to save a category with a filled title'); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); - $I->waitForText('Category Manager: Add A New Weblinks Category','30',['css' => 'h1']); - $I->fillField(['id' => 'jform_title'],'automated testing unpub' . rand(1,100)); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('category.save')\"]"]); - - $I->expectTo('see a success message after saving the category'); - $I->see('Category successfully saved',['id' => 'system-message-container']); - - $I->amGoingTo('Search for automated testing'); - $I->fillField(['xpath'=> "//input[@id=\"filter_search\"]"], "automated testing unpub" . "\n"); - - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->amGoingTo('Select the first weblink'); - $I->click(['xpath'=> "//input[@id=\"cb0\"]"]); - - $I->amGoingTo('Try to publish a weblink category'); - $I->click(['xpath'=> "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.publish')}\"]"]); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('See a success message after publishing the category'); - $I->see('1 category successfully published.',['id' => 'system-message-container']); - - // Unpublish it again - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->amGoingTo('Select the first weblink'); - $I->click(['xpath'=> "//input[@id=\"cb0\"]"]); - - $I->amGoingTo('Try to unpublish a weblink category'); - $I->click(['xpath'=> "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.unpublish')}\"]"]); - $I->waitForText('Weblinks: Categories','30',['css' => 'h1']); - $I->expectTo('See a success message after unpublishing the category'); - $I->see('1 category successfully unpublished',['id' => 'system-message-container']); - } -} \ No newline at end of file diff --git a/tests/acceptance/MenuCest.php b/tests/acceptance/MenuCest.php deleted file mode 100644 index cb24708..0000000 --- a/tests/acceptance/MenuCest.php +++ /dev/null @@ -1,57 +0,0 @@ -am('Administrator'); - $I->wantToTest('Frontend menu creation in /administrator/'); - - $I->doAdministratorLogin(); - $I->amGoingTo('Navigate to Menu Manager page in /administrator/'); - $I->amOnPage('administrator/index.php?option=com_menus&view=items&menutype=mainmenu'); - $I->waitForText('Menus: Items','30', ['css' => 'h1']); - $I->expectTo('see menu menager items'); - $I->checkForPhpNoticesOrWarnings(); - $I->amGoingTo('try to save a category with a filled title'); - $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.add')\"]"]); - $I->waitForText('Menus: New Item','30', ['css' => 'h1']); - $I->fillField(['id' => 'jform_title'], 'automated testing' . rand(1, 100)); - $I->click(['xpath' => "//a[@href=\"#menuTypeModal\"]"]); - $I->waitForElement('.iframe','30'); - $I->comment('I switch to Menu Type iframe'); - $I->switchToIFrame("Menu Item Type"); - $I->waitForElementVisible(['link' => "Weblinks"],'30'); - $I->click(['link' => "Weblinks"]); - $I->wait(1); - $I->waitForElementVisible(['xpath' => "//a[contains(@title, 'Show all the web link categories within a category')]"], 60); - $I->click(['xpath' => "//a[contains(@title, 'Show all the web link categories within a category')]"]); - $I->wait(1); - $I->switchToIFrame(); - $I->waitForElement(['xpath' => "//input[@value='List All Web Link Categories']"],'30'); - $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('item.apply')\"]"]); - $I->expectTo('see a success message after saving the category'); - $I->see('Menu item successfully saved', ['id' => 'system-message-container']); - } -} diff --git a/tests/acceptance/_bootstrap.php b/tests/acceptance/_bootstrap.php index 8a88555..3ea1d8c 100644 --- a/tests/acceptance/_bootstrap.php +++ b/tests/acceptance/_bootstrap.php @@ -1,2 +1,4 @@ am('Administrator'); + $I->wantToTest('Category creation in /administrator/'); + + $I->doAdministratorLogin(); + + $I->amGoingTo('Navigate to Categories page in /administrator/'); + $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('see categories page'); + $I->checkForPhpNoticesOrWarnings(); + + $I->amGoingTo('try to save a category with a filled title'); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); + $I->waitForText('Category Manager: Add A New Weblinks Category', '30', ['css' => 'h1']); + $I->fillField(['id' => 'jform_title'], 'automated testing' . rand(1, 100)); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.apply')\"]"]); + $I->expectTo('see a success message after saving the category'); + $I->see('Category successfully saved', ['id' => 'system-message-container']); + } + + public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I) + { + $I->am('Administrator'); + $I->wantToTest('Category creation in /administrator/ without title'); + + $I->doAdministratorLogin(); + + $I->amGoingTo('Navigate to Categories page in /administrator/'); + $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('see categories page'); + + $I->amGoingTo('try to save a category with empty title and it should fail'); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); + $I->waitForText('Category Manager: Add A New Weblinks Category', '30', ['css' => 'h1']); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.apply')\"]"]); + $I->expectTo('see an error when trying to save a category without title'); + $I->see('Invalid field: Title', ['id' => 'system-message-container']); + } + + public function administratorPublishCategory(AcceptanceTester $I) + { + $I->am('Administrator'); + $I->wantToTest('Category publishing in /administrator/'); + + $I->doAdministratorLogin(); + + $I->amGoingTo('Navigate to Categories page in /administrator/'); + $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('see categories page'); + $I->checkForPhpNoticesOrWarnings(); + + $I->amGoingTo('try to save a category with a filled title'); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); + $I->waitForText('Category Manager: Add A New Weblinks Category', '30', ['css' => 'h1']); + $I->fillField(['id' => 'jform_title'], 'automated testing pub' . rand(1, 100)); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.save')\"]"]); + + $I->expectTo('see a success message after saving the category'); + $I->see('Category successfully saved', ['id' => 'system-message-container']); + + $I->amGoingTo('Search for automated testing'); + $I->fillField(['xpath' => "//input[@id=\"filter_search\"]"], "automated testing pub" . "\n"); + + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->amGoingTo('Select the first weblink'); + $I->click(['xpath' => "//input[@id=\"cb0\"]"]); + + $I->amGoingTo('try to publish a weblink category'); + $I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.publish')}\"]"]); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('see a success message after publishing the category'); + $I->see('1 category successfully published.', ['id' => 'system-message-container']); + } + + public function administratorUnpublishCategory(AcceptanceTester $I) + { + $I->am('Administrator'); + $I->wantToTest('Category unpublishing in /administrator/'); + + $I->doAdministratorLogin(); + + $I->amGoingTo('Navigate to Categories page in /administrator/'); + $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks'); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('see categories page'); + $I->checkForPhpNoticesOrWarnings(); + + $I->amGoingTo('try to save a category with a filled title'); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]); + $I->waitForText('Category Manager: Add A New Weblinks Category', '30', ['css' => 'h1']); + $I->fillField(['id' => 'jform_title'], 'automated testing unpub' . rand(1, 100)); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.save')\"]"]); + + $I->expectTo('see a success message after saving the category'); + $I->see('Category successfully saved', ['id' => 'system-message-container']); + + $I->amGoingTo('Search for automated testing'); + $I->fillField(['xpath' => "//input[@id=\"filter_search\"]"], "automated testing unpub" . "\n"); + + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->amGoingTo('Select the first weblink'); + $I->click(['xpath' => "//input[@id=\"cb0\"]"]); + + $I->amGoingTo('Try to publish a weblink category'); + $I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.publish')}\"]"]); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('See a success message after publishing the category'); + $I->see('1 category successfully published.', ['id' => 'system-message-container']); + + // Unpublish it again + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->amGoingTo('Select the first weblink'); + $I->click(['xpath' => "//input[@id=\"cb0\"]"]); + + $I->amGoingTo('Try to unpublish a weblink category'); + $I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.unpublish')}\"]"]); + $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']); + $I->expectTo('See a success message after unpublishing the category'); + $I->see('1 category successfully unpublished', ['id' => 'system-message-container']); + } +} \ No newline at end of file diff --git a/tests/acceptance/AdministratorWeblinksCest.php b/tests/acceptance/administrator/AdministratorWeblinksCest.php similarity index 81% rename from tests/acceptance/AdministratorWeblinksCest.php rename to tests/acceptance/administrator/AdministratorWeblinksCest.php index b11c378..301bf27 100644 --- a/tests/acceptance/AdministratorWeblinksCest.php +++ b/tests/acceptance/administrator/AdministratorWeblinksCest.php @@ -7,47 +7,43 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ -use \AcceptanceTester; - class AdministratorWeblinksCest { - private $title; - public function __construct() { - // This way works just fine, but not 100% sure if that is the recommended way: - $this->title = 'automated testing' . rand(1,100); + $this->faker = Faker\Factory::create(); + $this->title = 'Weblink' . $this->faker->randomNumber(); + $this->url = $this->faker->url(); } - public function administratorCreateWeblink(AcceptanceTester $I) + public function administratorCreateWeblink(\Step\Acceptance\weblink $I) { $I->am('Administrator'); $I->wantToTest('Weblink creation in /administrator/'); $I->doAdministratorLogin(); + // Get the weblink StepObject $I->amGoingTo('Navigate to Weblinks page in /administrator/'); $I->amOnPage('administrator/index.php?option=com_weblinks'); - $I->waitForText('Web Links','30',['css' => 'h1']); + $I->waitForText('Web Links', '30', ['css' => 'h1']); $I->expectTo('see weblinks page'); $I->checkForPhpNoticesOrWarnings(); $I->amGoingTo('try to save a weblink with a filled title and URL'); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('weblink.add')\"]"]); - $I->waitForText('Web Link: New','30',['css' => 'h1']); + $I->click('New'); + $I->waitForText('Web Link: New', '30', ['css' => 'h1']); $I->fillField(['id' => 'jform_title'], $this->title); - $I->fillField(['id' => 'jform_url'],'http://example.com/automated_testing' . $this->title); - $I->click(['xpath'=> "//button[@onclick=\"Joomla.submitbutton('weblink.save')\"]"]); - $I->waitForText('Web Links','30',['css' => 'h1']); + $I->fillField(['id' => 'jform_url'], $this->url); + $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.save')\"]"]); + $I->waitForText('Web Links', '30', ['css' => 'h1']); $I->expectTo('see a success message and the weblink added after saving the weblink'); - $I->see('Web link successfully saved',['id' => 'system-message-container']); - $I->see($this->title,['id' => 'weblinkList']); + $I->see('Web link successfully saved', ['id' => 'system-message-container']); + $I->see($this->title, ['id' => 'weblinkList']); } /** * @depends administratorCreateWeblink - * - * @param AcceptanceTester $I */ public function administratorTrashWeblink(AcceptanceTester $I) { @@ -75,9 +71,7 @@ class AdministratorWeblinksCest } /** - * @depends administratorCreateWeblink - * - * @param AcceptanceTester $I + * @depends administratorTrashWeblink */ public function administratorDeleteWeblink(AcceptanceTester $I) { diff --git a/tests/acceptance/frontend/FrontendWeblinksCest.php b/tests/acceptance/frontend/FrontendWeblinksCest.php new file mode 100644 index 0000000..b88dd5a --- /dev/null +++ b/tests/acceptance/frontend/FrontendWeblinksCest.php @@ -0,0 +1,53 @@ +faker = Faker\Factory::create(); + $this->title = 'Weblink' . $this->faker->randomNumber(); + $this->url = $this->faker->url(); + $this->menuItem = 'Menu Item' . $this->faker->randomNumber(); + } + + /** + * Create a weblink in the backend and confirm it exists and is visible in the Frontend + * + * @param \Step\Acceptance\Weblink $I + */ + public function createWeblinkAndConfirmFrontend(\Step\Acceptance\weblink $I) + { + $I->am('Administrator'); + $I->wantToTest('Listing a category of Weblinks in frontend'); + + $I->doAdministratorLogin(); + + $I->createWeblink($this->title, $this->url); + + // Menu link + $I->createMenuItem($this->menuItem, 'Weblinks', 'List All Web Link Categories', 'Main Menu'); + + // Go to the frontend + $I->comment('I want to check if the menu entry exists in the frontend'); + $I->amOnPage('index.php?option=com_weblinks'); + $I->expectTo('see weblink categories'); + $I->waitForText('Uncategorised','30', ['css' => 'h3']); + $I->checkForPhpNoticesOrWarnings(); + $I->comment('I open the uncategorised Weblink Category'); + $I->click(['link' => 'Uncategorised']); + + $I->waitForText('Uncategorised','30', ['css' => 'h2']); + $I->expectTo('see the weblink we created'); + $I->seeElement(['link' => $this->title]); + $I->seeElement(['xpath' => "//a[@href='$this->url']"]); + } +} diff --git a/tests/acceptance/01-InstallWeblinksCest.php b/tests/acceptance/install/InstallWeblinksCest.php similarity index 82% rename from tests/acceptance/01-InstallWeblinksCest.php rename to tests/acceptance/install/InstallWeblinksCest.php index 6093714..e046ae8 100644 --- a/tests/acceptance/01-InstallWeblinksCest.php +++ b/tests/acceptance/install/InstallWeblinksCest.php @@ -1,4 +1,5 @@ am('Administrator'); $I->installJoomla(); @@ -19,8 +19,10 @@ class InstallWeblinksCest $I->setErrorReportingToDevelopment(); } - // tests - public function installWeblinks(AcceptanceTester $I) + /** + * @depends installJoomla + */ + public function installWeblinks(\AcceptanceTester $I) { $I->doAdministratorLogin(); $I->comment('get Weblinks repository folder from acceptance.suite.yml (see _support/AcceptanceHelper.php)');