diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-06-09 12:06:14 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-06-09 12:06:14 +0200 |
commit | cdbe39d0069b107ec0b2d77b262f108f06519199 (patch) | |
tree | 9806ace0d5e8a12b56999d901a56f3327125f77f /tests/acceptance/features/bootstrap | |
parent | f5ecd1c100a9a09120f22ed9aa3d5753531ce360 (diff) | |
download | nextcloud-server-cdbe39d0069b107ec0b2d77b262f108f06519199.tar.gz nextcloud-server-cdbe39d0069b107ec0b2d77b262f108f06519199.zip |
Properly check for the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r-- | tests/acceptance/features/bootstrap/AppsManagementContext.php | 23 |
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"); + } + } + } |