This repository was archived by the owner on Mar 17, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Com contacts tests and steps #97
Open
degobbis
wants to merge
31
commits into
joomla-projects:staging
Choose a base branch
from
degobbis:com_contacts
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 4514c76
personalize
degobbis 8bcba19
Tests com_contacts
degobbis a1dfa98
Reverting roboFile
degobbis 0605333
Added tests on acceptance.suite.dist.yml
degobbis 433a5ca
Merge remote-tracking branch 'refs/remotes/upstram/staging'
degobbis 27dd01e
Merge remote-tracking branch 'refs/remotes/origin/com_contacts'
degobbis 50e5910
Merged branch staging into staging
degobbis 9f16143
Now works on chrome, firefox, edge and IE
compojoom 121a6b7
update branch
compojoom 697be2c
update branch
compojoom d084daa
fix mac detection and codestyle
compojoom 1ce2991
Merge branch 'staging'
degobbis eea811d
Codestyle
degobbis 8aa352d
Now works on chrome, firefox, edge and IE
compojoom 87d0a35
update branch
compojoom f29ec51
fix mac detection and codestyle
compojoom 9858f76
Merged branch staging into com_contacts
degobbis 4f21501
Merge branch 'staging'
degobbis c56e13f
Merged branch staging into com_contacts
degobbis e3d1e72
Revert old dependencies composer.lock
810 4854a1c
Merged branch test66 into com_contacts
degobbis e1d6915
Finished test for single contact
degobbis 7ee49e1
Merge branch 'staging'
degobbis 12ce4c8
Merged branch staging into com_contacts
degobbis 3fffb1e
Merged branch staging into com_contacts
degobbis 4b1e65a
Merged branch staging into com_contacts
degobbis 7cf8f15
Merged branch com_contacts into com_contacts
degobbis 8583465
Merged branch staging into com_contacts
degobbis 17b7c69
Merge branch 'staging'
degobbis 43962c1
Merge pull request #122 from yvesh/fixEnv
degobbis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
tests/codeception/_support/Page/Acceptance/Administrator/ContactManagerPage.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']"]; | ||
|
||
/** | ||
* 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); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@degobbis check https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception#Writting_reliable_locators
There was a problem hiding this comment.
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
?