update tests

This commit is contained in:
Jelle Kok 2017-09-01 01:11:19 +02:00
parent 78b8e47eaf
commit f1c7b7745a
5 changed files with 25 additions and 49 deletions

View File

@ -1,6 +1,14 @@
sudo: true # Forces new Travis-CI Infrastructure
sudo: false
language: php language: php
dist: trusty
addons:
chrome: stable
apt:
packages:
- xvfb
- fluxbox
env: env:
global: global:
@ -14,8 +22,6 @@ matrix:
env: RUN_PHPCS="yes" env: RUN_PHPCS="yes"
- php: 7.0 - php: 7.0
sudo: true sudo: true
addons:
firefox: "47.0.1"
- php: 7.1 - php: 7.1
- php: hhvm - php: hhvm
sudo: true sudo: true
@ -57,10 +63,6 @@ before_script:
- sudo apt-get install fluxbox -y --force-yes - sudo apt-get install fluxbox -y --force-yes
- fluxbox & - fluxbox &
- sleep 3 # give fluxbox some time to start - sleep 3 # give fluxbox some time to start
# Install Chrome
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- export CHROME_BIN=/usr/bin/google-chrome
# Composer # Composer
- composer install - composer install

View File

@ -33,6 +33,7 @@ class RoboFile extends \Robo\Tasks
{ {
// Load tasks from composer, see composer.json // Load tasks from composer, see composer.json
use \Joomla\Jorobo\Tasks\loadTasks; use \Joomla\Jorobo\Tasks\loadTasks;
use \Joomla\Testing\Robo\Tasks\LoadTasks;
/** /**
* File extension for executables * File extension for executables
@ -298,16 +299,13 @@ class RoboFile extends \Robo\Tasks
*/ */
public function runSelenium() public function runSelenium()
{ {
if (!$this->isWindows()) $this->taskSeleniumStandaloneServer()
{ ->setBinary('vendor/bin/selenium-server-standalone')
$this->_exec("vendor/bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &'); ->setWebdriver($this->getWebDriver())
} ->runSelenium()
else ->waitForSelenium()
{ ->run()
$this->_exec("START java.exe -jar " . $this->getWebDriver() . ' vendor\joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar '); ->stopOnFail();
}
sleep(3);
} }
/** /**
@ -329,14 +327,7 @@ class RoboFile extends \Robo\Tasks
$this->getComposer(); $this->getComposer();
if ($this->isWindows()) $this->taskComposerInstall('composer')->run();
{
$this->taskComposerInstall('composer')->run();
}
else
{
$this->taskComposerInstall('composer.phar')->run();
}
$this->runSelenium(); $this->runSelenium();

View File

@ -13,7 +13,7 @@ modules:
config: config:
JoomlaBrowser: JoomlaBrowser:
url: 'http://localhost/tests/joomla' # the url that points to the joomla installation at /tests/system/joomla-cms url: 'http://localhost/tests/joomla' # the url that points to the joomla installation at /tests/system/joomla-cms
browser: 'firefox' browser: 'chrome'
window_size: 1280x1024 window_size: 1280x1024
username: 'admin' # UserName for the Administrator username: 'admin' # UserName for the Administrator
password: 'admin' # Password for the Administrator password: 'admin' # Password for the Administrator

View File

@ -1,21 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_weblinks
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
class InstallJoomlaCest
{
public function installJoomla(\AcceptanceTester $I)
{
$I->am('Administrator');
$I->installJoomlaRemovingInstallationFolder();
$I->doAdministratorLogin();
$I->disableStatistics();
$I->setErrorReportingToDevelopment();
}
}

View File

@ -12,7 +12,11 @@ class InstallWeblinksCest
{ {
public function installJoomla(\AcceptanceTester $I) public function installJoomla(\AcceptanceTester $I)
{ {
$I->am('Administrator');
$I->installJoomlaRemovingInstallationFolder();
$I->doAdministratorLogin(); $I->doAdministratorLogin();
$I->disableStatistics();
$I->setErrorReportingToDevelopment();
} }
/** /**
@ -21,7 +25,7 @@ class InstallWeblinksCest
public function installWeblinks(\AcceptanceTester $I) public function installWeblinks(\AcceptanceTester $I)
{ {
$I->comment('get Weblinks repository folder from acceptance.suite.yml (see _support/AcceptanceHelper.php)'); $I->comment('get Weblinks repository folder from acceptance.suite.yml (see _support/AcceptanceHelper.php)');
$I->doAdministratorLogin();
// URL where the package file to install is located (mostly the same as joomla-cms) // URL where the package file to install is located (mostly the same as joomla-cms)
$I->installExtensionFromFileUpload('pkg-weblinks-current.zip'); $I->installExtensionFromFileUpload('pkg-weblinks-current.zip');
$I->doAdministratorLogout(); $I->doAdministratorLogout();