summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-05 22:00:22 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-08 07:55:44 +0000
commit3a470c2ebe70bafbd76ca75e7603a8c59e175224 (patch)
treef60e75abe22be327c558427247eec5d659d90af5 /tests/acceptance/features/bootstrap
parentb086a0f007267be306ed9248b1d418fae527c648 (diff)
downloadnextcloud-server-3a470c2ebe70bafbd76ca75e7603a8c59e175224.tar.gz
nextcloud-server-3a470c2ebe70bafbd76ca75e7603a8c59e175224.zip
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: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r--tests/acceptance/features/bootstrap/AppsManagementContext.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
index 82d4561bd28..332c3b020ec 100644
--- a/tests/acceptance/features/bootstrap/AppsManagementContext.php
+++ b/tests/acceptance/features/bootstrap/AppsManagementContext.php
@@ -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()
+ );
}
/**