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
dist: trusty
addons:
chrome: stable
apt:
packages:
- xvfb
- fluxbox
env:
global:
@ -14,8 +22,6 @@ matrix:
env: RUN_PHPCS="yes"
- php: 7.0
sudo: true
addons:
firefox: "47.0.1"
- php: 7.1
- php: hhvm
sudo: true
@ -57,10 +63,6 @@ before_script:
- sudo apt-get install fluxbox -y --force-yes
- fluxbox &
- 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 install

View File

@ -33,6 +33,7 @@ class RoboFile extends \Robo\Tasks
{
// Load tasks from composer, see composer.json
use \Joomla\Jorobo\Tasks\loadTasks;
use \Joomla\Testing\Robo\Tasks\LoadTasks;
/**
* File extension for executables
@ -298,16 +299,13 @@ class RoboFile extends \Robo\Tasks
*/
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 ');
}
sleep(3);
$this->taskSeleniumStandaloneServer()
->setBinary('vendor/bin/selenium-server-standalone')
->setWebdriver($this->getWebDriver())
->runSelenium()
->waitForSelenium()
->run()
->stopOnFail();
}
/**
@ -329,14 +327,7 @@ class RoboFile extends \Robo\Tasks
$this->getComposer();
if ($this->isWindows())
{
$this->taskComposerInstall('composer')->run();
}
else
{
$this->taskComposerInstall('composer.phar')->run();
}
$this->taskComposerInstall('composer')->run();
$this->runSelenium();

View File

@ -13,7 +13,7 @@ modules:
config:
JoomlaBrowser:
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
username: 'admin' # UserName 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)
{
$I->am('Administrator');
$I->installJoomlaRemovingInstallationFolder();
$I->doAdministratorLogin();
$I->disableStatistics();
$I->setErrorReportingToDevelopment();
}
/**
@ -21,7 +25,7 @@ class InstallWeblinksCest
public function installWeblinks(\AcceptanceTester $I)
{
$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)
$I->installExtensionFromFileUpload('pkg-weblinks-current.zip');
$I->doAdministratorLogout();