summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/AppsManagementContext.php
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-05 20:17:53 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-03-05 22:06:05 +0100
commitd5586ec4370588aae7dd33a7f370ae4e00dbe843 (patch)
tree238869f915aa9001383e18e3d88ed3ffd5b16ea4 /tests/acceptance/features/bootstrap/AppsManagementContext.php
parentcaa22465686008cda588133ad1e94dfc6ff02487 (diff)
downloadnextcloud-server-d5586ec4370588aae7dd33a7f370ae4e00dbe843.tar.gz
nextcloud-server-d5586ec4370588aae7dd33a7f370ae4e00dbe843.zip
Verify WaitFor::element... results with an assertion
WaitFor::element... calls only perform the waiting and return whether the condition succeeded or not, but that result needs to be explicitly checked to prevent further steps from being executed if the wait failed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/features/bootstrap/AppsManagementContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/AppsManagementContext.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
index d86b972c85b..b692e77ca60 100644
--- a/tests/acceptance/features/bootstrap/AppsManagementContext.php
+++ b/tests/acceptance/features/bootstrap/AppsManagementContext.php
@@ -164,7 +164,12 @@ class AppsManagementContext implements Context, ActorAwareInterface {
* @Then /^I see that there some apps listed from the app store$/
*/
public function iSeeThatThereSomeAppsListedFromTheAppStore() {
- WaitFor::elementToBeEventuallyShown($this->actor, self::appEntries(), 10);
+ if (!WaitFor::elementToBeEventuallyShown(
+ $this->actor,
+ self::appEntries(),
+ $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
+ PHPUnit_Framework_Assert::fail("The apps from the app store were not shown yet after $timeout seconds");
+ }
}
/**