/**
  * @depends installJoomla
  */
 public function installWeblinks(\AcceptanceTester $I)
 {
     $I->doAdministratorLogin();
     $I->comment('get Weblinks repository folder from acceptance.suite.yml (see _support/AcceptanceHelper.php)');
     $path = $I->getConfiguration('repo_folder');
     $I->installExtensionFromFolder($path . 'src/com_weblinks/');
     $I->doAdministratorLogout();
 }
示例#2
0
 /**
  * @depends installJoomla
  */
 public function installWeblinks(\AcceptanceTester $I)
 {
     $I->doAdministratorLogin();
     $I->comment('get Weblinks repository folder from acceptance.suite.yml (see _support/AcceptanceHelper.php)');
     // URL where the package file to install is located (mostly the same as joomla-cms)
     $url = $I->getConfiguration('url');
     $I->installExtensionFromUrl($url . "/pkg-weblinks-current.zip");
     $I->doAdministratorLogout();
 }
示例#3
0
 public function installNeno(AcceptanceTester $I)
 {
     $I->maximizeWindow();
     $I->am('Administrator');
     $I->installJoomla();
     $I->doAdministratorLogin();
     $I->setErrorReportingToDevelopment();
     $I->amOnPage("/administrator/");
     $I->click("Extensions");
     $I->click("Extension Manager");
     $I->click("Upload Package File");
     $path = $I->getConfiguration('repo_folder');
     // Installing library
     $I->installExtensionFromDirectory($path . 'lib_neno');
     // Installing Plugin
     $I->installExtensionFromDirectory($path . 'plg_system_neno');
     // Installing Component
     $I->installExtensionFromDirectory($path . 'com_neno');
     // Enabling plugin
     $I->enablePlugin('Neno plugin');
     // Going to Neno
     $I->click("Components");
     $I->wait(1);
     $I->click("Neno Translate");
     $I->wait(1);
     // Get started Screen
     $I->click('Get Started');
     $I->waitForJS('return jQuery.active == 0', 5);
     $I->wait(1);
     // First step - Source language
     $I->see('Next');
     $I->click(['xpath' => "//button[@type=\"button\"]"]);
     $I->wait(1);
     // Second step - Translation methods
     $I->click('Next');
     $I->waitForJS('return jQuery.active == 0', 5);
     // Third step- Install language(s)
     $I->wait(1);
     $I->click("//*[@id=\"add-languages-button\"]");
     $I->waitForJS("return jQuery.active == 0", 5);
     $I->waitForElementVisible(['class' => 'ar-AA'], 5);
     $I->wait(1);
     $I->click(['class' => 'ar-AA']);
     $I->see('Close', ['class' => 'close-button']);
     $I->click(['class' => 'close-button'], ['xpath' => "//*[@id=\"languages-modal\"]"]);
     $I->click(['xpath' => "(//button[@type=\"button\"])[4]"]);
     // Fourth step- Installing Neno
     $I->wait(1);
     $I->click("#backup-created-checkbox");
     $I->click("#proceed-button");
     // Fifth step- Installing Neno has been accomplish successfully
     //$I->waitForJS('return jQuery.installation == 1', 1000);
     $I->waitForElement(".icon-thumbs-up", 300);
     $I->doAdministratorLogout();
 }
 public function administratorCreateCategoryWithoutTitleFails(AcceptanceTester $I)
 {
     $I->am('Administrator');
     $I->wantToTest('Category creation in /administrator/ without title fails');
     $I->doAdministratorLogin();
     $I->amGoingTo('Navigate to Categories page in /administrator/');
     $I->amOnPage('administrator/index.php?option=com_categories&extension=com_weblinks');
     $I->waitForText('Weblinks: Categories', '60', ['css' => 'h1']);
     $I->expectTo('see categories page');
     $I->amGoingTo('try to save a category with empty title and it should fail');
     $I->clickToolbarButton('new');
     $I->waitForText('Weblinks: New Category', '60', ['css' => 'h1']);
     $I->clickToolbarButton('save');
     $I->expectTo('see an error when trying to save a category without title');
     $I->see('Invalid field:  Title', ['id' => 'system-message-container']);
 }
示例#5
0
 /**
  * @depends installCmc
  */
 public function initializeCmcSettings(\AcceptanceTester $I)
 {
     $I->doAdministratorLogin();
     $I->comment('Mailchimp API Key from acceptance.suite.yml (see _support/AcceptanceHelper.php)');
     $key = $I->getConfiguration('api_key');
     $I->amGoingTo('Navigate to CMC page in /administrator/');
     $I->amOnPage('administrator/index.php?option=com_cmc&view=cpanel');
     // Wait for text dashboard - wait for text not working
     $I->waitForElementVisible('#ctitle');
     $I->checkForPhpNoticesOrWarnings();
     // Options
     $I->click('Options');
     $I->waitForText('Configuration', '30', ['css' => 'h1']);
     $I->fillField(['id' => 'jform_api_key'], $key);
     $I->click('Save & Close');
     // Basck in the dashboard
     $I->waitForElementVisible('#ctitle');
     $I->doAdministratorLogout();
 }
 public function administratorUnpublishCategory(AcceptanceTester $I)
 {
     $I->am('Administrator');
     $I->wantToTest('Category unpublishing in /administrator/');
     $I->doAdministratorLogin();
     $I->amGoingTo('Navigate to Categories page in /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->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.add')\"]"]);
     $I->waitForText('Category Manager: Add A New Weblinks Category', '30', ['css' => 'h1']);
     $I->fillField(['id' => 'jform_title'], 'automated testing unpub' . rand(1, 100));
     $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('category.save')\"]"]);
     $I->expectTo('see a success message after saving the category');
     $I->see('Category successfully saved', ['id' => 'system-message-container']);
     $I->amGoingTo('Search for automated testing');
     $I->fillField(['xpath' => "//input[@id=\"filter_search\"]"], "automated testing unpub" . "\n");
     $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
     $I->amGoingTo('Select the first weblink');
     $I->click(['xpath' => "//input[@id=\"cb0\"]"]);
     $I->amGoingTo('Try to publish a weblink category');
     $I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.publish')}\"]"]);
     $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
     $I->expectTo('See a success message after publishing the category');
     $I->see('1 category successfully published.', ['id' => 'system-message-container']);
     // Unpublish it again
     $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
     $I->amGoingTo('Select the first weblink');
     $I->click(['xpath' => "//input[@id=\"cb0\"]"]);
     $I->amGoingTo('Try to unpublish a weblink category');
     $I->click(['xpath' => "//button[@onclick=\"if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list.');}else{ Joomla.submitbutton('categories.unpublish')}\"]"]);
     $I->waitForText('Weblinks: Categories', '30', ['css' => 'h1']);
     $I->expectTo('See a success message after unpublishing the category');
     $I->see('1 category successfully unpublished', ['id' => 'system-message-container']);
 }
<?php

/**
* @package     redCORE
* @subpackage  Cept
* @copyright   Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved.
* @license     GNU General Public License version 2 or later; see LICENSE.txt
*/
// Load the Step Object Page
$I = new \AcceptanceTester($scenario);
$I = new AcceptanceTester($scenario);
$I->wantTo('Uninstall redCORE Extension');
$I->doAdministratorLogin();
$I->amOnPage('/administrator/index.php?option=com_installer&view=manage');
$I->waitForText('Extensions: Manage', 30, ['css' => 'H1']);
$I->fillField('#filter_search', 'redCORE - component');
$I->click(['xpath' => "//button[@type='submit' and @data-original-title='Search']"]);
$I->waitForElement(['id' => 'manageList']);
$I->click(['xpath' => "//input[@id='cb0']"]);
$I->click(['xpath' => "//div[@id='toolbar-delete']/button"]);
$I->waitForText('Uninstalling the component was successful', 30, ['id' => 'system-message-container']);
$I->see('Uninstalling the component was successful', ['id' => 'system-message-container']);
$I->fillField(['id' => 'filter_search'], 'redCORE - component');
$I->click(['xpath' => "//button[@type='submit' and @data-original-title='Search']"]);
$I->waitForText('There are no extensions installed matching your query.', 30, ['class' => 'alert-no-items']);
$I->see('There are no extensions installed matching your query.', ['class' => 'alert-no-items']);
 public function administratorCreateWeblinkWithoutTitleFails(AcceptanceTester $I)
 {
     $I->am('Administrator');
     $I->wantToTest('Weblink creation without title fails in /administrator/');
     $I->doAdministratorLogin();
     $I->amGoingTo('Navigate to Weblinks page in /administrator/');
     $I->amOnPage('administrator/index.php?option=com_weblinks');
     $I->waitForText('Web Links', '30', ['css' => 'h1']);
     $I->expectTo('see weblinks page');
     $I->checkForPhpNoticesOrWarnings();
     $I->amGoingTo('try to save a weblink with empty title and it should fail');
     $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.add')\"]"]);
     $I->waitForText('Web Link: New', '30', ['css' => 'h1']);
     $I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.apply')\"]"]);
     $I->expectTo('see an error when trying to save a weblink without title and without URL');
     $I->see('Invalid field:  Title', ['id' => 'system-message-container']);
     $I->see('Invalid field:  URL', ['id' => 'system-message-container']);
 }
示例#9
0
 public function installNeno(AcceptanceTester $I)
 {
     $I->am('Administrator');
     $I->installJoomla();
     $I->doAdministratorLogin();
     $I->setErrorReportingToDevelopment();
     $I->amOnPage("/administrator/");
     $I->click("Extensions");
     $I->click("Extension Manager");
     $I->click("Upload Package File");
     $path = $I->getConfiguration('repo_folder');
     // Installing library
     $I->installExtensionFromDirectory($path . 'lib_neno');
     // Installing Plugin
     $I->installExtensionFromDirectory($path . 'plg_system_neno');
     // Installing Component
     $I->installExtensionFromDirectory($path . 'com_neno');
     /*
     		// Enabling plugin
     		$I->enablePlugin('Neno plugin');
     
     		// Going to Neno
     		$I->click("Components");
     		$I->click("Neno");
     		$I->wait(5);
     
     		// Get started Screen
     		$I->click('Get Started');
     		$I->waitForJS('return jQuery.active == 0', 20);
     		$I->wait(5);
     
     		// First step - Source language
     		$I->see('Next', 'button');
     		$I->click(['xpath' => "//button[@type='button']"]);
     		$I->waitForJS('return jQuery.active == 0', 20);
     		$I->wait(5);
     
     		// Second step - Translation methods
     		$I->see('Next');
     		$I->click(['xpath' => "//button[@type='button']"]);
     		$I->waitForJS('return jQuery.active == 0', 20);
     		$I->wait(5);
     
     		// Third step- Install language(s)
     		$I->click(['css' => "#add-languages-button"]);
     		$I->waitForJS('return jQuery.active == 0', 20);
     		$I->wait(5);
     		$I->waitForElementVisible(['css' => '#languages-modal']);
     		$I->click(['css' => "[data-language='de-DE']"]);
     		$I->click(['css' => "[data-language='es-ES']"]);
     		$I->wait(10);
     		$I->seeElement(['css' => ".loading-iso-de-DE"]);
     		$I->seeElement(['css' => ".loading-iso-es-ES"]);
     		$I->click("Close");
     		$I->click(['xpath' => "(//button[@type='button'])[4]"]);
     
     		// Fourth step- Installing Neno
     		$I->wait(5);
     		$I->click(['css' => "#backup-created-checkbox"]);
     		$I->click(['css' => "label.checkbox"]);
     		$I->click(['css' => "#proceed-button"]);
     
     		// Fifth step- Installing Neno has been accomplish successfully
     		$I->waitForElement("#submenu > li > a");
     		$I->doAdministratorLogout();*/
 }