summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/AppsManagementContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap/AppsManagementContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/AppsManagementContext.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
index 117fb9b2c4b..b9896305182 100644
--- a/tests/acceptance/features/bootstrap/AppsManagementContext.php
+++ b/tests/acceptance/features/bootstrap/AppsManagementContext.php
@@ -106,6 +106,14 @@ class AppsManagementContext implements Context, ActorAwareInterface {
describedAs("Enable button in the app list");
}
+ /**
+ * @return Locator
+ */
+ public static function sidebar() {
+ return Locator::forThe()->id("app-sidebar")->
+ describedAs("Sidebar in apps management");
+ }
+
/**
* @When I enable the :app app
@@ -205,5 +213,20 @@ class AppsManagementContext implements Context, ActorAwareInterface {
PHPUnit\Framework\Assert::assertEquals('Enable all', $this->actor->find(self::bundleButton($bundle))->getValue());
}
+ /**
+ * @Given /^I see that the app details are shown$/
+ */
+ public function iSeeThatTheAppDetailsAreShown() {
+ // The sidebar always exists in the DOM, so it has to be explicitly
+ // waited for it to be visible instead of relying on the implicit wait
+ // made to find the element.
+ if (!WaitFor::elementToBeEventuallyShown(
+ $this->actor,
+ self::sidebar(),
+ $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
+ PHPUnit_Framework_Assert::fail("The sidebar was not shown yet after $timeout seconds");
+ }
+ }
+
}