Merge pull request #12215 from nextcloud/wait-for-the-link-share-menu-to-open-in-acceptance-tests

Wait for the link share menu to open in acceptance tests
This commit is contained in:
Roeland Jago Douma 2018-11-02 19:35:32 +01:00 committed by GitHub
commit 927130ef34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,6 +350,14 @@ class FilesAppContext implements Context, ActorAwareInterface {
$this->actor->find(FileListContext::shareActionForFile(self::currentSectionMainView(), $fileName), 10)->click();
$this->actor->find(self::shareLinkAddNewButton(), 5)->click();
// Wait until the menu was opened after the share creation to continue.
if (!WaitFor::elementToBeEventuallyShown(
$this->actor,
self::shareLinkMenu(),
$timeout = 5 * $this->actor->getFindTimeoutMultiplier())) {
PHPUnit_Framework_Assert::fail("The share link menu is not open yet after $timeout seconds");
}
}
/**