32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-11-14 08:44:06 +00:00

Merge branch 'master' into 4.0-dev

This commit is contained in:
wilsonge 2019-08-19 20:52:26 +01:00
commit 3b8ade5bd8
No known key found for this signature in database
GPG Key ID: EF81319318FC9D04
26 changed files with 2356 additions and 738 deletions

View File

@ -1,20 +1,30 @@
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
volumes:
- name: weblinks_cache
host:
path: /tmp/weblinks_cache
---
kind: signature
hmac: 41c9d399a788c8e97a0444ee8483682cfcb5b21d920b4012852a48ed3b2e9db8
...

View File

@ -1,5 +1,7 @@
sudo: true
language: php
services:
- xvfb
env:
global:
@ -8,28 +10,16 @@ env:
matrix:
fast_finish: true
include:
- php: 5.6
env: RUN_PHPCS="yes"
- php: 7.0
env: RUN_PHPCS="yes"
sudo: true
addons:
firefox: "47.0.1"
firefox: 'latest-esr'
- php: 7.1
- php: 7.2
- 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.3
before_script:
# Forcing localhost in hosts file
@ -47,10 +37,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 &

32
CHANGELOG.md Normal file
View File

@ -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*

View File

@ -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'))
@ -26,11 +30,11 @@ if (!defined('JPATH_BASE'))
*
* @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
@ -77,22 +81,13 @@ class RoboFile extends \Robo\Tasks
/**
* 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 '';
@ -102,10 +97,11 @@ class RoboFile extends \Robo\Tasks
* 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'])
{
@ -166,6 +162,8 @@ class RoboFile extends \Robo\Tasks
* @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')
{
@ -205,8 +203,8 @@ class RoboFile extends \Robo\Tasks
}
$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;
@ -215,7 +213,7 @@ class RoboFile extends \Robo\Tasks
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
@ -245,7 +243,7 @@ class RoboFile extends \Robo\Tasks
$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')
@ -441,26 +439,23 @@ class RoboFile extends \Robo\Tasks
* 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();
}
@ -498,7 +493,12 @@ class RoboFile extends \Robo\Tasks
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();
}
/**
@ -589,6 +589,7 @@ class RoboFile extends \Robo\Tasks
* @return string the webdriver string to use with selenium
*
* @since version
* @throws \Codeception\Exception\ConfigurationException
*/
public function getWebdriver()
{
@ -627,8 +628,8 @@ class RoboFile extends \Robo\Tasks
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);
@ -699,9 +700,9 @@ class RoboFile extends \Robo\Tasks
*
* @param String $target The target joomla instance
*
* @return void
* @since __DEPLOY_VERSION__
*
* @return void
*/
public function map($target)
{

View File

@ -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

View File

@ -4,20 +4,22 @@
"license" : "GPL-2.0+",
"config": {
"platform": {
"php": "5.5.33"
"php": "5.6.0"
}
},
"require" : {
"php": ">=5.3.10"
"php": ">=5.4"
},
"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.1.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"
}
}

2748
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,8 @@ class WeblinkTable extends \JTable
// Verify that the alias is unique
$table = new WeblinkTable($this->getDbo());
if ($table->load(array('language' => $this->language, 'alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
if ($table->load(array('language' => $this->language, 'alias' => $this->alias, 'catid' => $this->catid))
&& ($table->id != $this->id || $this->id == 0))
{
$this->setError(\JText::_('COM_WEBLINKS_ERROR_UNIQUE_ALIAS'));

View File

@ -131,6 +131,7 @@ class HtmlView extends \Joomla\CMS\MVC\View\HtmlView
if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks')
&& $user->authorise('core.edit.state', 'com_weblinks'))
{
\JHtml::_('bootstrap.renderModal', 'collapseModal');
$title = \JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button

View File

@ -49,8 +49,8 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<div class="row">
<div class="col-md-9">
<div class="form-vertical">
<?php echo $this->form->getControlGroup('url'); ?>
<?php echo $this->form->getControlGroup('description'); ?>
<?php echo $this->form->renderField('url'); ?>
<?php echo $this->form->renderField('description'); ?>
</div>
</div>
<div class="col-md-3">
@ -62,9 +62,9 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'images', JText::_('JGLOBAL_FIELDSET_IMAGE_OPTIONS', true)); ?>
<div class="row">
<div class="col-md-6">
<?php echo $this->form->getControlGroup('images'); ?>
<?php echo $this->form->renderField('images'); ?>
<?php foreach ($this->form->getGroup('images') as $field) : ?>
<?php echo $field->getControlGroup(); ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</div>
</div>

View File

@ -19,8 +19,6 @@ class Pkg_WeblinksInstallerScript extends JInstallerScript
/**
* Extension script constructor.
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function __construct()

View File

@ -63,7 +63,7 @@ class WeblinksModelWeblink extends JModelItem
/**
* Method to get an object.
*
* @param integer $id The id of the object to get.
* @param integer $pk The id of the object to get.
*
* @return mixed Object on success, false on failure.
*/
@ -191,7 +191,7 @@ class WeblinksModelWeblink extends JModelItem
/**
* Method to increment the hit counter for the weblink
*
* @param integer $id Optional ID of the weblink.
* @param integer $pk Optional ID of the weblink.
*
* @return boolean True on success
*/

View File

@ -12,7 +12,7 @@ defined('JPATH_BASE') or die;
use Joomla\Registry\Registry;
// Load the base adapter.
require_once JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/adapter.php';
JLoader::register('FinderIndexerAdapter', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/adapter.php');
/**
* Smart Search adapter for Joomla Web Links.

View File

@ -38,7 +38,7 @@ class PlgSystemWeblinks extends JPlugin
/**
* Method to add statistics information to Administrator control panel.
*
* @param string $extension The extension requesting information.
* @param string $extension The extension requesting information.
*
* @return array containing statistical information.
*

View File

@ -11,5 +11,5 @@ I am going to "try to archive a weblink category"
I click toolbar button "archive"
I wait for element "['id' => 'system-message-container']"," '60"
I expect to "see a success message after Archiving the category"
I see "1 category successfully archived."," ['id' => 'system-message-container']"
I see "1 category archived."," ['id' => 'system-message-container']"

View File

@ -13,5 +13,5 @@ I wait for text "Category Manager: Add A New Weblinks Category"," '60"," ['css'
I fill field "['id' => 'jform_title']"," $this->categoryTitle"
I click toolbar button "Save & Close"
I expect to "see a success message after saving the category"
I see "Category successfully saved"," ['id' => 'system-message-container']"
I see "Category saved"," ['id' => 'system-message-container']"

View File

@ -12,5 +12,5 @@ I am going to "try to delete a Weblinks Category"
I click toolbar button "Empty trash"
I wait for element "['id' => 'system-message-container']"," '60"
I expect to "see a success message after Deleting the category"
I see "1 category successfully deleted."," ['id' => 'system-message-container']"
I see "1 category deleted."," ['id' => 'system-message-container']"

View File

@ -11,5 +11,5 @@ I am going to "try to publish a Weblinks Category"
I click toolbar button "publish"
I wait for element "['id' => 'system-message-container']"," '60"
I expect to "see a success message after publishing the category"
I see "1 category successfully published."," ['id' => 'system-message-container']"
I see "1 category published."," ['id' => 'system-message-container']"

View File

@ -12,5 +12,5 @@ I am going to "try to delete a Weblinks Category"
I click toolbar button "Trash"
I wait for element "['id' => 'system-message-container']"," '60"
I expect to "see a success message after Trashing the category"
I see "1 category successfully trashed."," ['id' => 'system-message-container']"
I see "1 category trashed."," ['id' => 'system-message-container']"

View File

@ -11,5 +11,5 @@ I am going to "try to unpublish a Weblinks Category"
I click toolbar button "unpublish"
I wait for element "['id' => 'system-message-container']"," '60"
I expect to "See a success message after unpublishing the category"
I see "1 category successfully unpublished"," ['id' => 'system-message-container']"
I see "1 category unpublished"," ['id' => 'system-message-container']"

View File

@ -17,39 +17,15 @@ namespace Step\Acceptance;
*
* @since 1.4
*/
class category extends \AcceptanceTester
class Category extends \AcceptanceTester
{
/**
* Function to create a Category in Joomla!
*
* @param String $categoryName Name of the Category which is to be created
*
* @return void
*/
public function createCategory($categoryName)
{
$I = $this;
$I->am('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->clickToolbarButton('New');
$I->waitForText('Weblinks: New Category', '30', ['css' => 'h1']);
$I->fillField(['id' => 'jform_title'], $categoryName);
$I->clickToolbarButton('Save & Close');
$I->expectTo('see a success message after saving the category');
$I->see('Category successfully saved', ['id' => 'system-message-container']);
}
/**
* Function to Trash a Category in Joomla!
*
* @param String $categoryName Name of the category which is to be trashed
* @param String $categoryName Name of the category which is to be trashed
*
* @return void
* @throws \Exception
*/
public function trashCategory($categoryName)
{
@ -66,9 +42,10 @@ class category extends \AcceptanceTester
/**
* Function to Delete a Category in Joomla!
*
* @param String $categoryName Name of the category which is to be deleted
* @param String $categoryName Name of the category which is to be deleted
*
* @return void
* @throws \Exception
*/
public function deleteCategory($categoryName)
{

View File

@ -11,15 +11,16 @@ namespace Step\Acceptance;
* @package Step\Acceptance
* @link http://codeception.com/docs/06-ReusingTestCode#StepObjects
*/
class weblink extends \AcceptanceTester
class Weblink extends \AcceptanceTester
{
/**
* Creates a weblink
*
* @param string $title The title for the weblink
* @param string $url The url for the weblink
* @param string $countClicks If not null, we set the "Count Clicks" weblink property to the given value.
* @param string $title The title for the weblink
* @param string $url The url for the weblink
* @param string $countClicks If not null, we set the "Count Clicks" weblink property to the given value.
*
* @throws \Exception
*/
public function createWeblink($title, $url, $countClicks = null)
{

View File

@ -1,4 +1,3 @@
<?php
// Here you can initialize variables that will be available to your tests
\Codeception\Util\Autoload::registerSuffix('Steps', __DIR__.DIRECTORY_SEPARATOR.'_steps');

View File

@ -1,5 +1,7 @@
<?php
use Step\Acceptance\Category;
/**
* @package Joomla.Administrator
* @subpackage com_weblinks
@ -43,7 +45,7 @@ class AdministratorCategoriesCest
$I->see('Invalid field: Title', ['id' => 'system-message-container']);
}
public function administratorCreateCategory(\Step\Acceptance\category $I)
public function administratorCreateCategory(Category $I)
{
$I->am('Administrator');
$I->wantToTest('create a Category in /administrator/');
@ -62,13 +64,13 @@ class AdministratorCategoriesCest
$I->fillField(['id' => 'jform_title'], $this->categoryTitle);
$I->clickToolbarButton('Save & Close');
$I->expectTo('see a success message after saving the category');
$I->see('Category successfully saved', ['id' => 'system-message-container']);
$I->see('Category saved', ['id' => 'system-message-container']);
}
/**
* @depends administratorCreateCategory
*/
public function administratorPublishCategory(\Step\Acceptance\category $I)
public function administratorPublishCategory(Category $I)
{
$I->am('Administrator');
@ -84,13 +86,13 @@ class AdministratorCategoriesCest
$I->clickToolbarButton('publish');
$I->waitForElement(['id' => 'system-message-container'], '60');
$I->expectTo('see a success message after publishing the category');
$I->see('1 category successfully published.', ['id' => 'system-message-container']);
$I->see('0 categories published.', ['id' => 'system-message-container']);
}
/**
* @depends administratorPublishCategory
*/
public function administratorUnpublishCategory(\Step\Acceptance\category $I)
public function administratorUnpublishCategory(Category $I)
{
$I->am('Administrator');
$I->wantToTest('Unpublish a Category in /administrator/');
@ -105,13 +107,13 @@ class AdministratorCategoriesCest
$I->clickToolbarButton('unpublish');
$I->waitForElement(['id' => 'system-message-container'], '60');
$I->expectTo('See a success message after unpublishing the category');
$I->see('1 category successfully unpublished', ['id' => 'system-message-container']);
$I->see('1 category unpublished', ['id' => 'system-message-container']);
}
/**
* @depends administratorUnpublishCategory
*/
public function administratorArchiveCategory(\Step\Acceptance\category $I)
public function administratorArchiveCategory(Category $I)
{
$I->am('Administrator');
$I->wantToTest('Archiving a Category in /administrator/');
@ -126,13 +128,13 @@ class AdministratorCategoriesCest
$I->clickToolbarButton('archive');
$I->waitForElement(['id' => 'system-message-container'], '60');
$I->expectTo('see a success message after Archiving the category');
$I->see('1 category successfully archived.', ['id' => 'system-message-container']);
$I->see('1 category archived.', ['id' => 'system-message-container']);
}
/**
* @depends administratorArchiveCategory
*/
public function administratorTrashCategory(\Step\Acceptance\category $I)
public function administratorTrashCategory(Category $I)
{
$I->am('Administrator');
$I->wantToTest('Trashing a Category in /administrator/');
@ -148,13 +150,13 @@ class AdministratorCategoriesCest
$I->clickToolbarButton('Trash');
$I->waitForElement(['id' => 'system-message-container'], '60');
$I->expectTo('see a success message after Trashing the category');
$I->see('1 category successfully trashed.', ['id' => 'system-message-container']);
$I->see('1 category trashed.', ['id' => 'system-message-container']);
}
/**
* @depends administratorTrashCategory
*/
public function administratorDeleteCategory(\Step\Acceptance\category $I)
public function administratorDeleteCategory(Category $I)
{
$I->am('Administrator');
$I->wantToTest('Deleting a Category in /administrator/');
@ -171,10 +173,10 @@ class AdministratorCategoriesCest
$I->acceptPopup();
$I->waitForElement(['id' => 'system-message-container'], '60');
$I->expectTo('see a success message after Deleting the category');
$I->see('1 category successfully deleted.', ['id' => 'system-message-container']);
$I->see('1 category deleted.', ['id' => 'system-message-container']);
}
public function administratorVerifyAvailableTabs(\Step\Acceptance\category $I)
public function administratorVerifyAvailableTabs(Category $I)
{
$I->am('Administrator');
$I->wantToTest('Category Edit View Tabs');

View File

@ -35,7 +35,7 @@ class AdministratorSmartSearchCest
$I->clickToolbarButton('Save & Close');
$I->waitForText('Control Panel', 30, ['class'=> 'page-title']);
$I->expectTo('see a success message after saving the configuration');
$I->see('Configuration successfully saved', ['id' => 'system-message-container']);
$I->see('Configuration saved', ['id' => 'system-message-container']);
}
public function administratorEnableContentPlugin(\Step\Acceptance\weblink $I)
@ -53,8 +53,8 @@ class AdministratorSmartSearchCest
$I->waitForText('Plugins: Content - Smart Search', 30, ['class'=> 'page-title']);
$I->selectOptionInChosen('Status', 'Enabled');
$I->clickToolbarButton('save & close');
$I->waitForText('Plugin successfully saved.', 30, ['id' => 'system-message-container']);
$I->see('Plugin successfully saved.', ['id' => 'system-message-container']);
$I->waitForText('Plugin saved.', 30, ['id' => 'system-message-container']);
$I->see('Plugin saved.', ['id' => 'system-message-container']);
}
/**
@ -74,8 +74,8 @@ class AdministratorSmartSearchCest
$I->waitForText('Plugins: Smart Search - Web Links', 30, ['class'=> 'page-title']);
$I->selectOptionInChosen('Status', 'Enabled');
$I->clickToolbarButton('save & close');
$I->waitForText('Plugin successfully saved.', 30, ['id' => 'system-message-container']);
$I->see('Plugin successfully saved.', ['id' => 'system-message-container']);
$I->waitForText('Plugin saved.', 30, ['id' => 'system-message-container']);
$I->see('Plugin saved.', ['id' => 'system-message-container']);
}
/**
@ -95,8 +95,8 @@ class AdministratorSmartSearchCest
$I->click('Clear Index');
$I->acceptPopup();
$I->waitForText('All items have been successfully deleted', 30, ['class' => 'alert-message']);
$I->see('All items have been successfully deleted', ['class' => 'alert-message']);
$I->waitForText('All items have been deleted', 30, ['class' => 'alert-message']);
$I->see('All items have been deleted', ['class' => 'alert-message']);
}
public function administratorCreateWeblink(\Step\Acceptance\weblink $I, $scenario)
@ -145,7 +145,7 @@ class AdministratorSmartSearchCest
$I->waitForElement(['link' => 'Content - Smart Search']);
$I->checkOption(['id' => 'cb0']);
$I->clickToolbarButton('Unpublish'); // Note: The button is called "Disable", but we need to call it "Unpublish" here.
$I->waitForText('Plugin successfully disabled', 30, ['class' => 'alert-message']);
$I->waitForText('Plugin disabled', 30, ['class' => 'alert-message']);
}
/**
@ -166,7 +166,7 @@ class AdministratorSmartSearchCest
$I->waitForElement(['link' => 'Smart Search - Web Links']);
$I->checkOption(['id' => 'cb0']);
$I->clickToolbarButton('Unpublish'); // Note: The button is called "Disable", but we need to call it "Unpublish" here.
$I->waitForText('Plugin successfully disabled', 30, ['class' => 'alert-message']);
$I->waitForText('Plugin disabled', 30, ['class' => 'alert-message']);
}
public function cleanUp(\Step\Acceptance\weblink $I, $scenario)

View File

@ -7,6 +7,8 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
use Step\Acceptance\Weblink;
/**
* Acceptance cest object class for admin steps
*
@ -37,7 +39,7 @@ class AdministratorWeblinksCest
*
* @return void
*/
public function administratorVerifyAvailableTabs(\Step\Acceptance\weblink $I)
public function administratorVerifyAvailableTabs(Weblink $I)
{
$I->am('Administrator');
$I->wantToTest('Weblinks Edit View Tabs');
@ -49,7 +51,7 @@ class AdministratorWeblinksCest
$I->waitForText('Web Links', '30', ['css' => 'h1']);
$I->clickToolbarButton('New');
$I->waitForText('Web Link: New', '30', ['css' => 'h1']);
$I->verifyAvailableTabs(['New Web Link', 'Images', 'Publishing', 'Options', 'Metadata']);
$I->verifyAvailableTabs(['New Web Link', 'Images', 'Publishing', 'Options']);
}
/**
@ -61,7 +63,7 @@ class AdministratorWeblinksCest
*
* @return void
*/
public function administratorCreateWeblink(\Step\Acceptance\weblink $I)
public function administratorCreateWeblink(Weblink $I)
{
$I->am('Administrator');
$I->wantToTest('Weblink creation in /administrator/');