Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
joomdonation authored Aug 18, 2021
2 parents d1e941f + 8ee3f1b commit 407b768
Show file tree
Hide file tree
Showing 32 changed files with 2,442 additions and 803 deletions.
71 changes: 51 additions & 20 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,51 @@
cache:
mount:
- vendor
- .git
build:
image: yveshoppe/joomla-systemtests:latest
commands:
- chmod a+x .drone/build.sh
- ./.drone/build.sh
- apache2ctl start
- service mysql start
- cd /tests/www
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- vendor/bin/robo run:tests
clone:
depth: 1
path: repo
---
kind: pipeline
name: default

steps:
- name: weblinks-codeception-tests
image: joomlaprojects/docker-systemtests:latest
commands:
- composer install
- chmod a+x .drone/build.sh
- ./.drone/build.sh
- apache2ctl start
- service mysql start
- cd /tests/www
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- vendor/bin/robo run:tests

- name: artifacts-system-tests
image: cschlosser/drone-ftps
depends_on: [ weblinks-codeception-tests ]
environment:
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
PLUGIN_HOSTNAME: ci.joomla.org:21
PLUGIN_SRC_DIR: /tests/_output/
PLUGIN_DEST_DIR: /artifacts
PLUGIN_SECURE: false
PLUGIN_EXCLUDE: ^\.git/$
commands:
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST_$DRONE_BUILD_NUMBER/system-tests
- echo https://ci.joomla.org:444$PLUGIN_DEST_DIR
- /bin/upload.sh
when:
status:
- failure

volumes:
- name: weblinks_cache
host:
path: /tmp/weblinks_cache

---
kind: signature
hmac: 9346f0e74d2605ebe7bc9d33ad0588c1073ba3a9d9b254b71a7a85e219089449

...
26 changes: 5 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sudo: true
language: php
services:
- xvfb

env:
global:
Expand All @@ -8,29 +10,15 @@ env:
matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
env: RUN_PHPCS="yes"
- php: 7.0
sudo: true
addons:
firefox: "47.0.1"
firefox: 'latest-esr'
- php: 7.1
- php: hhvm
sudo: true
dist: trusty
group: edge # Until the next stable image update sometime after 2016-12-01
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- mysql
- postgresql
allow_failures:
- php: hhvm
- php: 7.2
- php: 7.3

before_script:
# Forcing localhost in hosts file
Expand All @@ -48,10 +36,6 @@ before_script:
- sudo sed -e "s?%PHPVERSION%?${TRAVIS_PHP_VERSION:0:1}?g" --in-place /etc/apache2/sites-available/default
- git submodule update --init --recursive
- sudo service apache2 restart
# Xvfb
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
# Fluxbox
- sudo apt-get install fluxbox -y --force-yes
- fluxbox &
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

#### 3.7.0

* Use correct database *2019-08-10*
* Move to namespaces *2019-08-10*
* First imageignores image float setting366 *2019-08-10*
* Changed language strings so that the parameter "image float" in the config is more concrete *2019-08-10*
* Improved the Batch view of com_weblinks *2019-08-10*
* add Jorobo Map Task To RoboFile *2019-08-10*
* makeSameAliasPossibleForDifferentLanguages *2019-08-10*
* mapping of new media files was not correct because of this you see the warning "JInstaller: :Install: File does not exist /var/www/html/weblinksecht/weblinks/tests/joomla/tmp/media/js" while installing *2019-08-10*
* Delete jed_update.xml *2019-08-10*
* xml code-style *2019-08-10*
* typo *2019-08-10*
* Serve updates through the downloads site *2019-08-10*
* Implementing full associations for single weblink *2019-08-10*
* Update composer *2019-08-10*
* Use correct database *2019-08-10*
* Move to namespaces *2019-08-10*
* First imageignores image float setting366 *2019-08-10*
* Changed language strings so that the parameter "image float" in the config is more concrete *2019-08-10*
* Improved the Batch view of com_weblinks *2019-08-10*
* add Jorobo Map Task To RoboFile *2019-08-10*
* makeSameAliasPossibleForDifferentLanguages *2019-08-10*
* mapping of new media files was not correct because of this you see the warning "JInstaller: :Install: File does not exist /var/www/html/weblinksecht/weblinks/tests/joomla/tmp/media/js" while installing *2019-08-10*
* Delete jed_update.xml *2019-08-10*
* xml code-style *2019-08-10*
* typo *2019-08-10*
* Serve updates through the downloads site *2019-08-10*
* Implementing full associations for single weblink *2019-08-10*
* Update composer *2019-08-10*
71 changes: 36 additions & 35 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

use Joomla\Jorobo\Tasks\loadTasks as loadReleaseTasks;
use Joomla\Testing\Robo\Tasks\loadTasks as loadTestingTasks;
use Robo\Tasks;

require_once 'vendor/autoload.php';

if (!defined('JPATH_BASE'))
Expand All @@ -26,11 +30,11 @@
*
* @since 1.0
*/
class RoboFile extends \Robo\Tasks
class RoboFile extends Tasks
{
// Load tasks from composer, see composer.json
use \joomla_projects\robo\loadTasks;
use \Joomla\Jorobo\Tasks\loadTasks;
use loadTestingTasks;
use loadReleaseTasks;

/**
* File extension for executables
Expand Down Expand Up @@ -77,22 +81,13 @@ public function __construct()
/**
* Get the executable extension according to Operating System
*
* @return void
* @return string
*/
private function getExecutableExtension()
{
if ($this->isWindows())
{
// Check wehter git.exe or git as command should be used,
// As on window both is possible
if (!$this->_exec('git.exe --version')->getMessage())
{
return '';
}
else
{
return '.exe';
}
return '.exe';
}

return '';
Expand All @@ -102,10 +97,11 @@ private function getExecutableExtension()
* 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
* - 'use-htaccess': renames and enable embedded Joomla .htaccess file
* - 'env': set a specific environment to get configuration from
*
* @return mixed
* @throws \Codeception\Exception\ConfigurationException
*/
public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
{
Expand Down Expand Up @@ -166,6 +162,8 @@ public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
* @param string $suite Optional name of the suite containing the tests, Acceptance by default.
*
* @return mixed
* @throws ReflectionException
* @throws \Codeception\Exception\ConfigurationException
*/
public function runTest($pathToTestFile = null, $suite = 'acceptance')
{
Expand Down Expand Up @@ -205,8 +203,8 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')
}

$this->say('');
$testNumber = $this->ask('Type the number of the test in the list that you want to run...');
$test = $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;
Expand All @@ -215,7 +213,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')
require 'tests/' . $suite . '/' . $test;

// Logic to fetch the class name from the file name
$fileName = explode("/", $test);
$fileName = explode("/", $test);
$className = explode(".", $fileName[1]);

// If the selected file is cest only than we will give the option to execute individual methods, we don't need this in cept file
Expand Down Expand Up @@ -245,7 +243,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')

$this->say('');
$methodNumber = $this->ask('Please choose the method in the test that you would want to run...');
$method = $methods[$methodNumber];
$method = $methods[$methodNumber];
}

if (isset($method) && $method != 'All')
Expand Down Expand Up @@ -441,26 +439,23 @@ private function getCmsPath()
* Runs Selenium Standalone Server.
*
* @return void
* @throws \Codeception\Exception\ConfigurationException
*/
public function runSelenium()
{
if (!$this->isWindows())
{
$this->_exec("vendor/bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &');
}
else
{
$this->_exec('START java.exe -jar' . $this->getWebDriver() .
' vendor\joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar ');
}

if ($this->isWindows())
{
// TODO: Move this logic to the selenium standalone server task in the parent joomla repo
$this->_exec('START java.exe -jar ' . $this->getWebDriver() .
' .\\vendor\\joomla-projects\\selenium-server-standalone\\bin\\selenium-server-standalone.jar ');
sleep(3);
}
else
{
$this->taskWaitForSeleniumStandaloneServer()
$this->taskSeleniumStandaloneServer()
->setWebdriver($this->getWebdriver())
->runSelenium()
->waitForSelenium()
->run()
->stopOnFail();
}
Expand Down Expand Up @@ -498,7 +493,12 @@ private function getComposer()
public function killSelenium($host = 'localhost', $port = '4444')
{
$this->say('Trying to kill the selenium server.');
$this->_exec("curl http://$host:$port/selenium-server/driver/?cmd=shutDownSeleniumServer");

$this->taskSeleniumStandaloneServer()
->setUrl("http://$host:$port")
->killSelenium()
->run()
->stopOnFail();
}

/**
Expand Down Expand Up @@ -589,6 +589,7 @@ public function headers()
* @return string the webdriver string to use with selenium
*
* @since version
* @throws \Codeception\Exception\ConfigurationException
*/
public function getWebdriver()
{
Expand Down Expand Up @@ -627,8 +628,8 @@ public function getWebdriver()
else
{
$this->yell(
print_r($codeceptMainConfig) .
'No driver for your browser. Check your browser in acceptance.suite.yml and the webDrivers in codeception.yml');
print_r($codeceptMainConfig) .
'No driver for your browser. Check your browser in acceptance.suite.yml and the webDrivers in codeception.yml');

// We can't do anything without a driver, exit
exit(1);
Expand Down Expand Up @@ -699,9 +700,9 @@ public function bump()
*
* @param String $target The target joomla instance
*
* @return void
* @since __DEPLOY_VERSION__
*
* @return void
*/
public function map($target)
{
Expand Down
16 changes: 7 additions & 9 deletions codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ settings:
memory_limit: 1024M
webdrivers:
firefox:
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\gecko\geckodriver64.exe
mac: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/gecko/geckodriver_mac
linux: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/gecko/geckodriver_linux_64
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\gecko\windows\geckodriver64.exe
mac: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/gecko/mac/geckodriver
linux: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/gecko/linux/geckodriver
chrome:
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\chrome\chromedriver.exe
mac: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/chromedriver_mac
linux: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/chromedriver_linux_64
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\chrome\windows\chromedriver.exe
mac: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/mac/chromedriver
linux: vendor/joomla-projects/selenium-server-standalone/bin/webdrivers/chrome/linux/chromedriver
internet explorer:
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\internet-explorer32\IEDriverServer.exe
MicrosoftEdge:
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\edge\MicrosoftWebDriver.exe
MicrosoftEdgeInsiders:
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\edge-insiders\MicrosoftWebDriver.exe
windows: vendor\joomla-projects\selenium-server-standalone\bin\webdrivers\edge\msedgedriver64.exe
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"name" : "joomla-extensions/weblinks",
"description": "The Open Source PHP Framework for creating complex Joomla extensions",
"license" : "GPL-2.0+",
"license" : "GPL-2.0-or-later",
"config": {
"platform": {
"php": "5.5.33"
"php": "5.6.0"
}
},
"require" : {
"php": ">=5.3.10"
"php": "^5.3.10|^7.0"
},
"require-dev": {
"codeception/codeception": "^2.2",
"joomla-projects/joomla-browser": "v3.6.5.1",
"php": ">=5.6",
"codeception/codeception": "^3",
"phpunit/phpunit": "^5.7.27",
"joomla-projects/joomla-browser": "v3.9.0",
"consolidation/robo": "^1.0.0",
"joomla-projects/robo": "~0",
"joomla-projects/selenium-server-standalone": "v3.1.0",
"joomla-projects/joomla-testing-robo": "~1.0",
"joomla-projects/selenium-server-standalone": "v3.14.0",
"fzaninotto/faker": "^1.6",
"joomla-projects/jorobo": "~0.6",
"Behat/Gherkin": "^4.4.1"
"joomla-projects/jorobo": "~0.7",
"behat/gherkin": "^4.4.1"
}
}
Loading

0 comments on commit 407b768

Please sign in to comment.