32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-11-16 17:45:08 +00:00

Improvements for createWeblink StepObject and cs

This commit is contained in:
Yves Hoppe 2015-09-28 22:07:32 +02:00
parent 75e1b225c9
commit c0d1ef16c4
3 changed files with 9 additions and 12 deletions

View File

@ -22,8 +22,8 @@ class AdministratorWeblinksCest
/**
* Create a weblink in the backend
*
* @param \AcceptanceTester $I
* @param \Codeception\Scenario $scenario - DI $scenario is need for Weblink Step
* @param AcceptanceTester $I
* @param \Codeception\Scenario $scenario DI - is needed for Weblink Step
*/
public function administratorCreateWeblink(AcceptanceTester $I, $scenario)
{
@ -32,9 +32,9 @@ class AdministratorWeblinksCest
$I->doAdministratorLogin();
// Get our Weblink Weblink StepObject
$weblinkStep = new AcceptanceTester\WeblinkSteps($scenario);
$weblinkStep->createWeblink($this->title);
// Get the weblink StepObject
$I = new AcceptanceTester\WeblinkSteps($scenario);
$I->createWeblink($this->title);
}
/**

View File

@ -22,11 +22,8 @@ class FrontendWeblinksCest
/**
* Create a weblink in the backend and confirm it exists and is visible in the Frontend
*
* @ depends \AdministratorWeblinksCest::administratorCreateWeblink
*
* @param \AcceptanceTester $I
*
* @return void
* @param AcceptanceTester $I
* @param \Codeception\Scenario $scenario DI - is needed for Weblink Step
*/
public function createWeblinkAndConfirmFrontend(AcceptanceTester $I, $scenario)
{
@ -35,7 +32,7 @@ class FrontendWeblinksCest
$I->doAdministratorLogin();
// Create Weblink with Weblink StepObject
// Get weblink StepObject
$weblinkStep = new AcceptanceTester\WeblinkSteps($scenario);
$weblinkStep->createWeblink($this->title);

View File

@ -27,7 +27,7 @@ class WeblinkSteps extends \AcceptanceTester
$I->checkForPhpNoticesOrWarnings();
$I->amGoingTo('try to save a weblink with a filled title and URL');
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('weblink.add')\"]"]);
$I->click('New');
$I->waitForText('Web Link: New', '30', ['css' => 'h1']);
$I->fillField(['id' => 'jform_title'], $title);
$I->fillField(['id' => 'jform_url'], 'http://example.com/automated_testing' . $title);