Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(test): use ContactGroupsPage in AclAccessGroups tests.
Browse files Browse the repository at this point in the history
The multiple contacts were manually added to the contact group
by manipulating select2 elements instead of relying on the Page.

Refs: #5570
  • Loading branch information
Matthieu Kermagoret authored and ganoze committed Aug 24, 2017
1 parent 6b6b9d3 commit 78f0830
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions features/bootstrap/AclAccessGroupsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,9 @@ public function oneContactGroupExistsIncludingTwoNonAdminContacts()
$this->page = new ContactGroupsConfigurationPage($this);
$this->page->setProperties(array(
'name' => $this->contactGroupName,
'alias' => $this->contactGroupAlias
'alias' => $this->contactGroupAlias,
'contacts' => array($this->firstContactName, $this->secondContactName)
));
$this->assertFind('css', 'span[class="select2-selection select2-selection--multiple"]')->click();
$this->spin(
function ($context) {
return $context->getSession()->getPage()->has('css', 'span ul li div[title="'
. $this->firstContactName . '"]');
},
'The user: ' . $this->firstContactName . ' does not exist or has not been found',
5
);
$this->assertFind('css', 'span ul li div[title="' . $this->firstContactName . '"]')->click();
$this->assertFind('css', 'span[class="select2-selection select2-selection--multiple"]')->click();
$this->spin(
function ($context) {
return $context->getSession()->getPage()->has('css', 'span ul li div[title="'
. $this->secondContactName . '"]');
},
'The user: ' . $this->secondContactName . ' does not exist or has not been found',
5
);
$this->assertFind('css', 'span ul li div[title="' . $this->secondContactName . '"]')->click();
$this->page->save();
}

Expand Down

0 comments on commit 78f0830

Please sign in to comment.