Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8df06cf
Merged branch staging into staging
degobbis Dec 10, 2016
4514c76
personalize
degobbis Dec 10, 2016
8bcba19
Tests com_contacts
degobbis Dec 10, 2016
a1dfa98
Reverting roboFile
degobbis Dec 10, 2016
0605333
Added tests on acceptance.suite.dist.yml
degobbis Dec 10, 2016
433a5ca
Merge remote-tracking branch 'refs/remotes/upstram/staging'
degobbis Dec 11, 2016
27dd01e
Merge remote-tracking branch 'refs/remotes/origin/com_contacts'
degobbis Dec 11, 2016
50e5910
Merged branch staging into staging
degobbis Dec 11, 2016
9f16143
Now works on chrome, firefox, edge and IE
compojoom Dec 10, 2016
121a6b7
update branch
compojoom Dec 10, 2016
697be2c
update branch
compojoom Dec 10, 2016
d084daa
fix mac detection and codestyle
compojoom Dec 11, 2016
1ce2991
Merge branch 'staging'
degobbis Dec 11, 2016
eea811d
Codestyle
degobbis Dec 11, 2016
8aa352d
Now works on chrome, firefox, edge and IE
compojoom Dec 10, 2016
87d0a35
update branch
compojoom Dec 10, 2016
f29ec51
fix mac detection and codestyle
compojoom Dec 11, 2016
9858f76
Merged branch staging into com_contacts
degobbis Dec 11, 2016
4f21501
Merge branch 'staging'
degobbis Dec 11, 2016
c56e13f
Merged branch staging into com_contacts
degobbis Dec 11, 2016
e3d1e72
Revert old dependencies composer.lock
810 Dec 11, 2016
4854a1c
Merged branch test66 into com_contacts
degobbis Dec 11, 2016
e1d6915
Finished test for single contact
degobbis Dec 11, 2016
7ee49e1
Merge branch 'staging'
degobbis Dec 11, 2016
12ce4c8
Merged branch staging into com_contacts
degobbis Dec 11, 2016
3fffb1e
Merged branch staging into com_contacts
degobbis Dec 15, 2016
4b1e65a
Merged branch staging into com_contacts
degobbis Dec 15, 2016
7cf8f15
Merged branch com_contacts into com_contacts
degobbis Dec 15, 2016
8583465
Merged branch staging into com_contacts
degobbis Dec 31, 2016
17b7c69
Merge branch 'staging'
degobbis Jan 22, 2017
43962c1
Merge pull request #122 from yvesh/fixEnv
degobbis Jan 22, 2017
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
11 changes: 10 additions & 1 deletion RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
->run()
->stopOnFail();

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

$this->taskCodecept($pathToCodeception)
->arg('--steps')
->arg('--debug')
Expand Down Expand Up @@ -671,4 +680,4 @@ private function createDatabase()
$this->yell("Error creating database: " . $connection->error);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ class AdminPage extends \AcceptanceTester
*/
public static $title = ['id' => 'jform_title'];

/**
* Locator for contact name
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $name = ['id' => 'jform_name'];

/**
* Locator for search input field
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php
/**
* @package Joomla.Test
* @subpackage AcceptanceTester.Page
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Page\Acceptance\Administrator;

/**
* Acceptance Page object class to define Contact Manager page objects.
*
* @package Page\Acceptance\Administrator
*
* @since __DEPLOY_VERSION__
*/
class ContactManagerPage extends AdminPage
{
/**
* Link to the contact listing page.
*
* @var string
* @since __DEPLOY_VERSION__
*/
public static $url = "/administrator/index.php?option=com_contact";

/**
* Link to the contact listing page.
*
* @var string
* @since __DEPLOY_VERSION__
*/
public static $contactTitle = "Contacts";

/**
* Locator for contact's name field
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $seeName = ['xpath' => "//table[@id='contactList']//tr[1]//td[4]"];

/**
* Locator for contact's unfeatured icon
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $seeFeatured = ['xpath' => "//table[@id='contactList']//*//span[@class='icon-featured']"];

/**
* Locator for contact's unfeatured icon
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $seeUnfeatured = ['xpath' => "//table[@id='contactList']//*//span[@class='icon-unfeatured']"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see if you can improve the xpath later, but for now it is okay 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have several contacts in the contactList this will return probably the first unfeatured icon. You will have to filter the list of results first, (searching for the specific contact) otherwise it can click the unfeatured of a different contact.

Should the description be:
Locator for contact's UNfeatured icon
instead of:
Locator for contact's featured icon
?


/**
* Locator for contact's access level field
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $seeAccessLevel = ['xpath' => "//table[@id='contactList']//tr[1]//td[6]"];

/**
* Locator for contact's unpublish icon
*
* @var array
* @since __DEPLOY_VERSION__
*/
public static $seeUnpublished = ['xpath' => "//table[@id='contactList']//*//span[@class='icon-unpublish']"];

/**
* Method to create new contact
*
* @param string $name The contact name
*
* @When I create new contact with field name as :name
*
* @since __DEPLOY_VERSION__
*
* @return void
*/
public function fillContactCreateForm($name)
{
$I = $this;

$I->fillField(self::$name, $name);
}
}
25 changes: 18 additions & 7 deletions tests/codeception/_support/Step/Acceptance/Administrator/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Page\Acceptance\Administrator\AdminPage;
use Page\Acceptance\Administrator\ArticleManagerPage;
use Page\Acceptance\Administrator\CategoryManagerPage;
use Page\Acceptance\Administrator\ContactManagerPage;
use Page\Acceptance\Administrator\ExtensionManagerPage;
use Page\Acceptance\Administrator\MenuManagerPage;
use Page\Acceptance\Administrator\UserAclPage;
Expand Down Expand Up @@ -91,6 +92,15 @@ class Admin extends \AcceptanceTester
*/
protected $menuManagerPage = null;

/**
* Contact Manager Page Object for this class
*
* @var null|ContactManagerPage
*
* @since __DEPLOY_VERSION__
*/
protected $contactManagerPage = null;

/**
* User constructor.
*
Expand All @@ -103,13 +113,14 @@ public function __construct(Scenario $scenario)
parent::__construct($scenario);

// Initialize Page Objects
$this->adminPage = new AdminPage($scenario);
$this->articleManagerPage = new ArticleManagerPage($scenario);
$this->categoryManagerPage = new CategoryManagerPage($scenario);
$this->userManagerPage = new UserManagerPage($scenario);
$this->userGroupPage = new UserGroupPage($scenario);
$this->userAclPage = new UserAclPage($scenario);
$this->menuManagerPage = new MenuManagerPage($scenario);
$this->adminPage = new AdminPage($scenario);
$this->articleManagerPage = new ArticleManagerPage($scenario);
$this->categoryManagerPage = new CategoryManagerPage($scenario);
$this->userManagerPage = new UserManagerPage($scenario);
$this->userGroupPage = new UserGroupPage($scenario);
$this->userAclPage = new UserAclPage($scenario);
$this->menuManagerPage = new MenuManagerPage($scenario);
$this->contactManagerPage = new ContactManagerPage($scenario);
$this->extensionManagerPage = new ExtensionManagerPage($scenario);
}

Expand Down
Loading