mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-16 09:02:52 +00:00
[4.0] Removing Joomla Robo from Systemtest execution (#26556)
* Removing Dependency on Jorobo * Trying whitelisted Ip's config * Chrome Driver version * Removing Joomla Robo from Systemtest execution * Removing JRobo from Joomla * Removing remnants of standalone selenium package
This commit is contained in:
parent
67a45c9330
commit
e935ffd1f8
494
RoboFile.php
494
RoboFile.php
|
@ -1,494 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage RoboFile
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
use Robo\Tasks;
|
||||
|
||||
/**
|
||||
* This is joomla project's console command file for Robo.li task runner.
|
||||
*
|
||||
* Do a `$ composer install` afterwards you will be able to execute robo like
|
||||
* `$ ./libraries/vendor/bin/robo` to see a list of commands
|
||||
*
|
||||
* @see http://robo.li/
|
||||
*/
|
||||
require_once __DIR__ . '/libraries/vendor/autoload.php';
|
||||
|
||||
if (!defined('JPATH_BASE'))
|
||||
{
|
||||
define('JPATH_BASE', __DIR__);
|
||||
}
|
||||
|
||||
/**
|
||||
* System Test (Codeception) test execution for Joomla!
|
||||
*
|
||||
* @package RoboFile
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
class RoboFile extends Tasks
|
||||
{
|
||||
use JoomlaRobo\Tasks;
|
||||
|
||||
/**
|
||||
* Path to the Selenium folder#
|
||||
*
|
||||
* @var string
|
||||
* @since 3.7.3
|
||||
*/
|
||||
const SELENIUM_FOLDER = __DIR__ . '/libraries/vendor/joomla-projects/selenium-server-standalone';
|
||||
|
||||
/**
|
||||
* Path to the vendor folder
|
||||
*
|
||||
* @var string
|
||||
* @since 3.7.3
|
||||
*/
|
||||
private $vendorPath = 'libraries/vendor/';
|
||||
|
||||
/**
|
||||
* Path to the tests
|
||||
*
|
||||
* @var string
|
||||
* @since 4.0.0
|
||||
*/
|
||||
private $testsPath = 'tests/Codeception/';
|
||||
|
||||
/**
|
||||
* @var array | null
|
||||
* @since 3.7.3
|
||||
*/
|
||||
private $suiteConfig;
|
||||
|
||||
/**
|
||||
* RoboFile constructor.
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Set default timezone (so no warnings are generated if it is not set)
|
||||
date_default_timezone_set('UTC');
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a testing Joomla site for running the tests (use it before run:test)
|
||||
*
|
||||
* @param bool $useHtaccess (1/0) Rename and enable embedded Joomla .htaccess file
|
||||
*
|
||||
* @return void
|
||||
* @since 3.7.3
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function createTestingSite($useHtaccess = false)
|
||||
{
|
||||
$cmsPath = $this->getSuiteConfig()['modules']['config']['Helper\\Acceptance']['cmsPath'];
|
||||
$localUser = $this->getSuiteConfig()['modules']['config']['Helper\\Acceptance']['localUser'];
|
||||
|
||||
// Clean old testing site
|
||||
if (is_dir($cmsPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->taskDeleteDir($cmsPath)->run();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
// Sorry, we tried :(
|
||||
$this->say('Sorry, you will have to delete ' . $cmsPath . ' manually.');
|
||||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
$exclude = [
|
||||
'.drone',
|
||||
'.github',
|
||||
'.git',
|
||||
'.run',
|
||||
'.idea',
|
||||
'build',
|
||||
'dev',
|
||||
'node_modules',
|
||||
'tests',
|
||||
'test-install',
|
||||
'.appveyor.yml',
|
||||
'.babelrc',
|
||||
'.drone.yml',
|
||||
'.editorconfig',
|
||||
'.eslintignore',
|
||||
'.eslintrc',
|
||||
'.gitignore',
|
||||
'.hound.yml',
|
||||
'.php_cs',
|
||||
'.travis.yml',
|
||||
'appveyor-phpunit.xml',
|
||||
'build.js',
|
||||
'build.xml',
|
||||
'codeception.yml',
|
||||
'composer.json',
|
||||
'composer.lock',
|
||||
'configuration.php',
|
||||
'drone-package.json',
|
||||
'Gemfile',
|
||||
'htaccess.txt',
|
||||
'karma.conf.js',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'phpunit.xml.dist',
|
||||
'RoboFile.dist.ini',
|
||||
'RoboFile.php',
|
||||
'robots.txt.dist',
|
||||
'scss-lint.yml',
|
||||
'selenium.log',
|
||||
'travisci-phpunit.xml',
|
||||
];
|
||||
|
||||
$this->copyJoomla($cmsPath, $exclude);
|
||||
|
||||
// Optionally change owner to fix permissions issues
|
||||
if (!empty($localUser))
|
||||
{
|
||||
$this->_exec('chown -R ' . $localUser . ' ' . $cmsPath);
|
||||
}
|
||||
|
||||
// Optionally uses Joomla default htaccess file. Used by TravisCI
|
||||
if ($useHtaccess == true)
|
||||
{
|
||||
$this->say('Renaming htaccess.txt to .htaccess');
|
||||
$this->_copy('./htaccess.txt', $cmsPath . '/.htaccess');
|
||||
$this->_exec('sed -e "s,# RewriteBase /,RewriteBase /test-install/joomla-cms,g" -in-place test-install/joomla-cms/.htaccess');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the Joomla installation excluding folders
|
||||
*
|
||||
* @param string $dst Target folder
|
||||
* @param array $exclude Exclude list of folders
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @since 3.7.3
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function copyJoomla($dst, $exclude = array())
|
||||
{
|
||||
$dir = @opendir(".");
|
||||
|
||||
if (false === $dir)
|
||||
{
|
||||
throw new Exception($this, "Cannot open source directory");
|
||||
}
|
||||
|
||||
if (!is_dir($dst))
|
||||
{
|
||||
mkdir($dst, 0755, true);
|
||||
}
|
||||
|
||||
while (false !== ($file = readdir($dir)))
|
||||
{
|
||||
if (in_array($file, $exclude))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (($file !== '.') && ($file !== '..'))
|
||||
{
|
||||
$srcFile = "." . '/' . $file;
|
||||
$destFile = $dst . '/' . $file;
|
||||
|
||||
if (is_dir($srcFile))
|
||||
{
|
||||
$this->_copyDir($srcFile, $destFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
copy($srcFile, $destFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes all the Selenium System Tests in a suite on your machine
|
||||
*
|
||||
* @param array $opts Array of configuration options:
|
||||
* - 'use-htaccess': renames and enable embedded Joomla .htaccess file
|
||||
* - 'env': set a specific environment to get configuration from
|
||||
*
|
||||
* @return void
|
||||
* @since 3.7.3
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
|
||||
{
|
||||
$this->say("Running tests");
|
||||
|
||||
$pathToCodeception = $this->prepareRun($opts);
|
||||
|
||||
$suites = [
|
||||
'acceptance/install/',
|
||||
'acceptance/administrator/components/com_content',
|
||||
'acceptance/administrator/components/com_media',
|
||||
'acceptance/administrator/components/com_menu',
|
||||
'acceptance/administrator/components/com_users',
|
||||
];
|
||||
|
||||
foreach ($suites as $suite) {
|
||||
$this->taskCodecept($pathToCodeception)
|
||||
->arg('--fail-fast')
|
||||
->arg('--steps')
|
||||
->arg('--debug')
|
||||
->env($opts['env'])
|
||||
->arg($this->testsPath . $suite)
|
||||
->run()
|
||||
->stopOnFail();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Install only Joomla
|
||||
*
|
||||
* @param array $opts Additional options
|
||||
*
|
||||
* @return void
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function runInstall($opts = ['use-htaccess' => false, 'env' => 'desktop'])
|
||||
{
|
||||
$this->say("Running Installation");
|
||||
|
||||
$pathToCodeception = $this->prepareRun($opts);
|
||||
|
||||
$this->taskCodecept($pathToCodeception)
|
||||
->arg('--fail-fast')
|
||||
->arg('--steps')
|
||||
->arg('--debug')
|
||||
->env($opts['env'])
|
||||
->arg($this->testsPath . 'acceptance/install/')
|
||||
->run()
|
||||
->stopOnFail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the installation
|
||||
*
|
||||
* @param array $opts Optional Options
|
||||
*
|
||||
* @return string Path to codeception
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function prepareRun($opts = ['use-htaccess' => false, 'env' => 'desktop'])
|
||||
{
|
||||
$this->createTestingSite($opts['use-htaccess']);
|
||||
|
||||
$this->taskRunSelenium(self::SELENIUM_FOLDER, $this->getWebdriver())->run();
|
||||
|
||||
// Wait until the server started
|
||||
sleep(3);
|
||||
|
||||
// Make sure to run the build command to generate AcceptanceTester
|
||||
if ($this->isWindows())
|
||||
{
|
||||
$this->_exec('php ' . $this->getWindowsPath($this->vendorPath . 'bin/codecept') . ' build');
|
||||
$pathToCodeception = $this->getWindowsPath($this->vendorPath . 'bin/codecept');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_exec('php ' . $this->vendorPath . 'bin/codecept build');
|
||||
|
||||
$pathToCodeception = $this->vendorPath . 'bin/codecept';
|
||||
}
|
||||
|
||||
return $pathToCodeception;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a specific Selenium System Tests in your machine
|
||||
*
|
||||
* @param string $pathToTestFile Optional name of the test to be run
|
||||
* @param string $suite Optional name of the suite containing the tests, Acceptance by default.
|
||||
*
|
||||
* @since 3.7.3
|
||||
*
|
||||
* @throws Exception if test not found
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function runTest($pathToTestFile = null, $suite = 'acceptance')
|
||||
{
|
||||
$this->taskRunSelenium(self::SELENIUM_FOLDER, $this->getWebdriver());
|
||||
|
||||
// Make sure to run the build command to generate AcceptanceTester
|
||||
$path = $this->vendorPath . 'bin/codecept';
|
||||
$this->_exec('php ' . $this->isWindows() ? $this->getWindowsPath($path) : $path . ' build');
|
||||
|
||||
if (!$pathToTestFile)
|
||||
{
|
||||
$this->say('Available tests in the system:');
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator(
|
||||
$this->testsPath . '/' . $suite,
|
||||
RecursiveDirectoryIterator::SKIP_DOTS
|
||||
),
|
||||
RecursiveIteratorIterator::SELF_FIRST
|
||||
);
|
||||
|
||||
$tests = array();
|
||||
$i = 1;
|
||||
|
||||
$iterator->rewind();
|
||||
|
||||
while ($iterator->valid())
|
||||
{
|
||||
if (strripos($iterator->getSubPathName(), 'cept.php')
|
||||
|| strripos($iterator->getSubPathName(), 'cest.php')
|
||||
|| strripos($iterator->getSubPathName(), '.feature')
|
||||
)
|
||||
{
|
||||
$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...');
|
||||
$test = $tests[$testNumber];
|
||||
}
|
||||
|
||||
$pathToTestFile = $this->testsPath . '/' . $suite . '/' . $test;
|
||||
|
||||
// Loading the class to display the methods in the class
|
||||
|
||||
// Logic to fetch the class name from the file name
|
||||
$fileName = explode("/", $test);
|
||||
|
||||
// If the selected file is cest only then we will give the option to execute individual methods, we don't need this in cept or feature files
|
||||
$i = 1;
|
||||
|
||||
if (isset($fileName[1]) && strripos($fileName[1], 'cest'))
|
||||
{
|
||||
require $this->testsPath . '/' . $suite . '/' . $test;
|
||||
|
||||
$className = explode(".", $fileName[1]);
|
||||
$class_methods = get_class_methods($className[0]);
|
||||
|
||||
$this->say('[' . $i . '] ' . 'All');
|
||||
|
||||
$methods[$i] = 'All';
|
||||
$i++;
|
||||
|
||||
foreach ($class_methods as $method_name)
|
||||
{
|
||||
$reflect = new ReflectionMethod($className[0], $method_name);
|
||||
|
||||
if (!$reflect->isConstructor() && $reflect->isPublic())
|
||||
{
|
||||
$this->say('[' . $i . '] ' . $method_name);
|
||||
|
||||
$methods[$i] = $method_name;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
$this->say('');
|
||||
$methodNumber = $this->ask('Please choose the method in the test that you would want to run...');
|
||||
$method = $methods[$methodNumber];
|
||||
}
|
||||
|
||||
if (isset($method) && $method != 'All')
|
||||
{
|
||||
$pathToTestFile = $pathToTestFile . ':' . $method;
|
||||
}
|
||||
|
||||
$testPathCodecept = $this->vendorPath . 'bin/codecept';
|
||||
|
||||
$this->taskCodecept($this->isWindows() ? $this->getWindowsPath($testPathCodecept) : $testPathCodecept)
|
||||
->test($pathToTestFile)
|
||||
->arg('--steps')
|
||||
->arg('--debug')
|
||||
->run()
|
||||
->stopOnFail();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if local OS is Windows
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
private function isWindows()
|
||||
{
|
||||
return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the correct path for Windows (needed by CMD)
|
||||
*
|
||||
* @param string $path Linux path
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
private function getWindowsPath($path)
|
||||
{
|
||||
return str_replace('/', DIRECTORY_SEPARATOR, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect the correct driver for selenium
|
||||
*
|
||||
* @return string the webdriver string to use with selenium
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
public function getWebdriver()
|
||||
{
|
||||
$suiteConfig = $this->getSuiteConfig();
|
||||
$driver = $suiteConfig['modules']['config']['JoomlaBrowser']['browser'];
|
||||
|
||||
return $driver;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the suite configuration
|
||||
*
|
||||
* @param string $suite Name of the test suite
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 3.7.3
|
||||
*/
|
||||
private function getSuiteConfig($suite = 'acceptance')
|
||||
{
|
||||
if (!$this->suiteConfig)
|
||||
{
|
||||
$this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents(__DIR__ . '/tests/Codeception/' . $suite . '.suite.yml'));
|
||||
}
|
||||
|
||||
return $this->suiteConfig;
|
||||
}
|
||||
}
|
|
@ -108,10 +108,7 @@
|
|||
"friendsofphp/php-cs-fixer": "~2.12",
|
||||
"squizlabs/php_codesniffer": "~3.0",
|
||||
"joomla-projects/joomla-browser": "~4.0@dev",
|
||||
"joomla-projects/robo-joomla": "dev-develop",
|
||||
"joomla-projects/selenium-server-standalone": "3.14.0",
|
||||
"codeception/codeception": "~3.0",
|
||||
"consolidation/robo": "^1.0.0",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"
|
||||
}
|
||||
}
|
||||
|
|
177
composer.lock
generated
177
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c2d9521396bad250579701210f92c251",
|
||||
"content-hash": "850a90a4b12fd564225cb6f74993eefd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "algo26-matthias/idna-convert",
|
||||
|
@ -4182,9 +4182,9 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Franck Nijhof",
|
||||
"role": "Developer / IT Manager",
|
||||
"email": "franck.nijhof@dealerdirect.com",
|
||||
"homepage": "http://www.frenck.nl"
|
||||
"homepage": "http://www.frenck.nl",
|
||||
"role": "Developer / IT Manager"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
||||
|
@ -5484,92 +5484,6 @@
|
|||
],
|
||||
"time": "2019-09-23T07:32:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla-projects/robo-joomla",
|
||||
"version": "dev-develop",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-projects/robo-joomla.git",
|
||||
"reference": "f2afed92313ac9588c20e977f3be280f3ccc9789"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-projects/robo-joomla/zipball/f2afed92313ac9588c20e977f3be280f3ccc9789",
|
||||
"reference": "f2afed92313ac9588c20e977f3be280f3ccc9789",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"consolidation/robo": "~1",
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"type": "robo-tasks",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JoomlaRobo\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0+"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Robert Deutz",
|
||||
"email": "rdeutz@googlemail.com"
|
||||
}
|
||||
],
|
||||
"description": "Robo tasks for Joomla! development, build, testing and everything",
|
||||
"time": "2018-08-09T20:32:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla-projects/selenium-server-standalone",
|
||||
"version": "v3.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/joomla-projects/selenium-server-standalone.git",
|
||||
"reference": "2939723f470918b6b72b0c05ba1978a41f0ef49d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/2939723f470918b6b72b0c05ba1978a41f0ef49d",
|
||||
"reference": "2939723f470918b6b72b0c05ba1978a41f0ef49d",
|
||||
"shasum": ""
|
||||
},
|
||||
"bin": [
|
||||
"bin/selenium-server-standalone"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"Selenium.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sven Eisenschmidt",
|
||||
"email": "sven.eisenschmidt@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Puneet Kala",
|
||||
"email": "puneet.kala@community.joomla.org"
|
||||
},
|
||||
{
|
||||
"name": "Javier Gomez",
|
||||
"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": "2018-08-19T04:08:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "joomla/cms-coding-standards",
|
||||
"version": "2.0.0-alpha2",
|
||||
|
@ -5872,18 +5786,18 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"role": "Developer",
|
||||
"email": "arne@blankerts.de"
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Heuer",
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpeople.de"
|
||||
"email": "sebastian@phpeople.de",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "Developer",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
|
||||
|
@ -6303,8 +6217,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
|
@ -6345,8 +6259,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
|
@ -6394,8 +6308,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
|
@ -6524,8 +6438,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
|
@ -7141,8 +7055,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Collection of value objects that represent the types of the PHP type system",
|
||||
|
@ -7184,8 +7098,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"role": "lead",
|
||||
"email": "sebastian@phpunit.de"
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
|
@ -7418,16 +7332,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v4.3.4",
|
||||
"version": "v4.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2"
|
||||
"reference": "6229f58993e5a157f6096fc7145c0717d0be8807"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
|
||||
"reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6229f58993e5a157f6096fc7145c0717d0be8807",
|
||||
"reference": "6229f58993e5a157f6096fc7145c0717d0be8807",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -7484,20 +7398,20 @@
|
|||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-08-26T08:55:16+00:00"
|
||||
"time": "2019-10-01T16:40:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
"version": "v1.1.5",
|
||||
"version": "v1.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
||||
"reference": "c61766f4440ca687de1084a5c00b08e167a2575c"
|
||||
"reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c",
|
||||
"reference": "c61766f4440ca687de1084a5c00b08e167a2575c",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
|
||||
"reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -7542,11 +7456,11 @@
|
|||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-06-20T06:46:26+00:00"
|
||||
"time": "2019-09-17T09:54:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v4.3.4",
|
||||
"version": "v4.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
|
@ -7596,16 +7510,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v4.3.4",
|
||||
"version": "v4.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2"
|
||||
"reference": "5e575faa95548d0586f6bedaeabec259714e44d1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
|
||||
"reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/5e575faa95548d0586f6bedaeabec259714e44d1",
|
||||
"reference": "5e575faa95548d0586f6bedaeabec259714e44d1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -7641,7 +7555,7 @@
|
|||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-08-14T12:26:46+00:00"
|
||||
"time": "2019-09-16T11:29:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php70",
|
||||
|
@ -7704,16 +7618,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v4.3.4",
|
||||
"version": "v4.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "e89969c00d762349f078db1128506f7f3dcc0d4a"
|
||||
"reference": "50556892f3cc47d4200bfd1075314139c4c9ff4b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a",
|
||||
"reference": "e89969c00d762349f078db1128506f7f3dcc0d4a",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/50556892f3cc47d4200bfd1075314139c4c9ff4b",
|
||||
"reference": "50556892f3cc47d4200bfd1075314139c4c9ff4b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -7749,7 +7663,7 @@
|
|||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-08-26T08:26:39+00:00"
|
||||
"time": "2019-09-26T21:17:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/stopwatch",
|
||||
|
@ -7834,8 +7748,8 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Arne Blankerts",
|
||||
"role": "Developer",
|
||||
"email": "arne@blankerts.de"
|
||||
"email": "arne@blankerts.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
||||
|
@ -7918,8 +7832,7 @@
|
|||
"joomla/cms-coding-standards": 20,
|
||||
"joomla/coding-standards": 20,
|
||||
"joomla/mediawiki": 20,
|
||||
"joomla-projects/joomla-browser": 20,
|
||||
"joomla-projects/robo-joomla": 20
|
||||
"joomla-projects/joomla-browser": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
JOOMLA_BASE=$1
|
||||
HEADER=$(cat <<'EOF'
|
||||
......._......................._........
|
||||
|
@ -34,14 +34,27 @@ echo -e "${HEADER}"
|
|||
echo "-------------------------------"
|
||||
tput sgr0 -T xterm
|
||||
|
||||
echo "[RUNNER] Prepare test environment"
|
||||
|
||||
# Switch to Joomla base directory
|
||||
cd $JOOMLA_BASE
|
||||
|
||||
# Install Joomla
|
||||
echo "[RUNNER] Copy files to test installation"
|
||||
rsync -a --exclude-from=tests/Codeception/exclude.txt $JOOMLA_BASE/ /tests/www/test-install/
|
||||
chown -R www-data /tests/www/test-install/
|
||||
|
||||
echo "[RUNNER] Start Apache & Chrome"
|
||||
apache2ctl -D FOREGROUND &
|
||||
google-chrome --version
|
||||
chmod 755 libraries/vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/linux/chromedriver
|
||||
libraries/vendor/bin/robo run:install --env mysql
|
||||
|
||||
echo "[RUNNER] Start Selenium"
|
||||
./node_modules/.bin/selenium-standalone install --drivers.chrome.version=77.0.3865.40 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
|
||||
./node_modules/.bin/selenium-standalone start --drivers.chrome.version=77.0.3865.40 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com >> selenium.log 2>&1 &
|
||||
sleep 5
|
||||
|
||||
echo "[RUNNER] Run Codeception"
|
||||
php libraries/vendor/bin/codecept build
|
||||
php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env mysql tests/Codeception/acceptance/01-install/
|
||||
|
||||
# Executing API tests
|
||||
libraries/vendor/bin/codecept run api --fail-fast --steps --debug
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
JOOMLA_BASE=$1
|
||||
DB_ENGINE=$2
|
||||
HEADER=$(cat <<'EOF'
|
||||
|
@ -30,19 +30,30 @@ HEADER=$(cat <<'EOF'
|
|||
EOF
|
||||
)
|
||||
|
||||
|
||||
tput setaf 2 -T xterm
|
||||
echo "-------------------------------"
|
||||
echo "${HEADER}"
|
||||
echo "-------------------------------"
|
||||
tput sgr0 -T xterm
|
||||
|
||||
echo "[RUNNER] Prepare test environment"
|
||||
|
||||
# Switch to Joomla base directory
|
||||
cd $JOOMLA_BASE
|
||||
|
||||
echo "[RUNNER] Copy files to test installation"
|
||||
rsync -a --exclude-from=tests/Codeception/exclude.txt $JOOMLA_BASE/ /tests/www/test-install/
|
||||
chown -R www-data /tests/www/test-install/
|
||||
|
||||
echo "[RUNNER] Start Apache & Chrome"
|
||||
apache2ctl -D FOREGROUND &
|
||||
google-chrome --version
|
||||
chmod 755 libraries/vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/linux/chromedriver
|
||||
|
||||
# Executing System tests
|
||||
libraries/vendor/bin/robo run:tests --env $DB_ENGINE
|
||||
echo "[RUNNER] Start Selenium"
|
||||
./node_modules/.bin/selenium-standalone install --drivers.chrome.version=77.0.3865.40 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
|
||||
./node_modules/.bin/selenium-standalone start --drivers.chrome.version=77.0.3865.40 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com >> selenium.log 2>&1 &
|
||||
sleep 5
|
||||
|
||||
echo "[RUNNER] Run Codeception"
|
||||
php libraries/vendor/bin/codecept build
|
||||
php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env $DB_ENGINE tests/Codeception/acceptance/
|
||||
|
|
29
tests/Codeception/exclude.txt
Normal file
29
tests/Codeception/exclude.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
.git
|
||||
.github
|
||||
build
|
||||
dev
|
||||
node_modules
|
||||
tests
|
||||
.appveyor.yml
|
||||
.drone.yml
|
||||
.editorconfig
|
||||
.eslintignore
|
||||
.eslintrc
|
||||
.gitignore
|
||||
.hound.yml
|
||||
.php_cs.dist
|
||||
build.js
|
||||
build.xml
|
||||
codeception.yml
|
||||
composer.json
|
||||
composer.lock
|
||||
crowdin.yml
|
||||
drone-package.json
|
||||
Gemfile
|
||||
Gemfile.lock
|
||||
package.json
|
||||
package-lock.json
|
||||
phpunit.xml.dist
|
||||
phpunit-pgsql.xml.dist
|
||||
scss-lint.yml
|
||||
selenium.log
|
Loading…
Reference in New Issue
Block a user