mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Properly check for the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
f5ecd1c100
commit
cdbe39d006
2 changed files with 26 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ Feature: apps
|
|||
And I am logged in as the admin
|
||||
And I open the Apps management
|
||||
When I click on the "QA testing" app
|
||||
Then I see that the sidebar is open
|
||||
Then I see that the app details are shown
|
||||
|
||||
# TODO: Improve testing with app store as external API
|
||||
# The following scenarios require the files_antivirus and calendar app
|
||||
|
|
@ -77,7 +77,7 @@ Feature: apps
|
|||
And I open the Apps management
|
||||
And I open the "Tools" section
|
||||
When I click on the "Antivirus App for files" app
|
||||
Then I see that the sidebar is open
|
||||
Then I see that the app details are shown
|
||||
|
||||
Scenario: Install an app from the app store
|
||||
Given I act as Jane
|
||||
|
|
@ -85,6 +85,6 @@ Feature: apps
|
|||
And I open the Apps management
|
||||
And I open the "Office & text" section
|
||||
And I click on the "Calendar" app
|
||||
And I see that the sidebar is open
|
||||
And I see that the app details are shown
|
||||
Then I download and enable the "Calendar" app
|
||||
And I see that the "Calendar" app has been enabled
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue