Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
->run()
->stopOnFail();

$this->taskCodecept($pathToCodeception)
->arg('--steps')
->arg('--debug')
->arg('--fail-fast')
->arg('--env ' . $opts['env'])
->arg('tests/acceptance/users_frontend.feature')
->run()
->stopOnFail();

/* $this->taskCodecept($pathToCodeception)
->arg('--steps')
->arg('--debug')
Expand Down
21 changes: 18 additions & 3 deletions tests/_support/Page/Acceptance/Administrator/UserManagerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,36 @@

class UserManagerPage extends AdminPage
{
public static $url = "administrator/index.php?option=com_users&view=users";

public static $pageTitleText = "Users";

public static $nameField = ['id' => 'jform_name'];

public static $usernameField = ['id' => 'jform_username'];

public static $passwordField = ['id' => 'jform_password'];

public static $password1Field = ['id' => 'jform_password1'];

public static $password2Field = ['id' => 'jform_password2'];

public static $emailField = ['id' => 'jform_email'];


public static $email1Field = ['id' => 'jform_email1'];

public static $email2Field = ['id' => 'jform_email2'];

public static $filterSearch = ['id' => 'filter_search'];

public static $iconSearch = ['class' => 'icon-search'];

public static $title = ['id' => 'jform_title'];

public static $url = "administrator/index.php?option=com_users&view=users";

public static $seeUserName = ['xpath' => "//table[@id='userList']//tr[1]/td[3]"];

public static $seeName = ['xpath' => "//table[@id='userList']//tr[1]/td[2]"];

public static $lastLoginDate = ['xpath' => "//table[@id='userList']//tr[1]/td[8]"];

}
19 changes: 19 additions & 0 deletions tests/_support/Page/Acceptance/Site/Frontendlogin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
namespace Page\Acceptance\Site;

class Frontendlogin
{
public static $profile = '/index.php?option=com_users&view=profile';

public static $modlgnUsername = ['id' => 'modlgn-username'];

public static $modlgnPasswd = ['id' => 'modlgn-passwd'];

public static $btnGroup = ['class' => 'btn-group'];

public static $btnPrimaryValidate = ['class' => 'btn-primary'];

public static $mdlLogin = ['xpath' => ".//*[@id='aside']/div[2]/h3"];


}
11 changes: 11 additions & 0 deletions tests/_support/Page/Acceptance/Site/Frontpage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace Page\Acceptance\Site;

class Frontpage extends \AcceptanceTester
{
public static $url = '/';

public static $alertMessage = ['class' => 'alert-message'];

public static $loginGreeting = ['class' => 'login-greeting'];
}
10 changes: 5 additions & 5 deletions tests/_support/Step/Acceptance/Administrator/User.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
namespace Step\Acceptance\Administrator;

use \Codeception\Util\Locator;
use Page\Acceptance\Administrator\AdminPage;
use Page\Acceptance\Administrator\LoginPage;
use Page\Acceptance\Administrator\UserAclPage;
use Page\Acceptance\Administrator\UserGroupPage;
use Page\Acceptance\Administrator\UserManagerPage;
use Page\Acceptance\Administrator\UserManagerPage;

class User extends \AcceptanceTester
{
Expand Down Expand Up @@ -47,7 +48,7 @@ public function iSaveTheUser()
public function iSeeTheMessage($message)
{
$I = $this;
$I->waitForText($message, 60, AdminPage::$systemMessageContainer);
$I->waitForText($message, TIMEOUT, AdminPage::$systemMessageContainer);
$I->see($message, AdminPage::$systemMessageContainer);
}

Expand Down Expand Up @@ -380,7 +381,7 @@ public function iGotoTheOptionSetting()
public function iSetAllowUserRegistrationAsAYes()
{
$I = $this;
$I->selectOptionInRadioField('Allow User Registration', 'Yes');
$I->click(Locator::contains('label', 'Yes'));
}

/**
Expand All @@ -393,13 +394,12 @@ public function iSaveTheSetting()

}


/**
* @Then I should be see the link Create an account in frontend
*/
public function iShouldBeSeeTheLinkCreateAnAccountInFrontend()
{
$I = $this;
$I->click(['class' => 'brand visible-desktop visible-tablet']);
$I->amOnPage('/');
}
}
Loading