Skip to content
Snippets Groups Projects
Commit 3a470c2e authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez Committed by backportbot[bot]
Browse files

Assert also element visibility instead of just finding it


Although if the element could not be found an exception would be thrown
and the test aborted if an element is in the DOM but hidden it would be
found and the test would pass.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent b086a0f0
No related branches found
No related tags found
No related merge requests found
......@@ -170,7 +170,9 @@ class AppsManagementContext implements Context, ActorAwareInterface {
*/
public function iSeeThatTheAppHasBeenEnabled($app) {
// TODO: Find a way to check if the enable button is removed
$this->actor->find(self::disableButtonForApp($app), 10);
PHPUnit_Framework_Assert::assertTrue(
$this->actor->find(self::disableButtonForApp($app), 10)->isVisible()
);
}
/**
......@@ -178,7 +180,9 @@ class AppsManagementContext implements Context, ActorAwareInterface {
*/
public function iSeeThatTheAppHasBeenDisabled($app) {
// TODO: Find a way to check if the disable button is removed
$this->actor->find(self::enableButtonForApp($app), 10);
PHPUnit_Framework_Assert::assertTrue(
$this->actor->find(self::enableButtonForApp($app), 10)->isVisible()
);
}
/**
......@@ -237,8 +241,12 @@ class AppsManagementContext implements Context, ActorAwareInterface {
* @Given /^I see the app bundles$/
*/
public function iSeeTheAppBundles() {
$this->actor->find(self::rowForApp('Auditing / Logging'), 2);
$this->actor->find(self::rowForApp('LDAP user and group backend'), 2);
PHPUnit_Framework_Assert::assertTrue(
$this->actor->find(self::rowForApp('Auditing / Logging'), 2)->isVisible()
);
PHPUnit_Framework_Assert::assertTrue(
$this->actor->find(self::rowForApp('LDAP user and group backend'), 2)->isVisible()
);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment