diff --git a/tests/acceptance/features/bootstrap/NotificationsCoreContext.php b/tests/acceptance/features/bootstrap/NotificationsCoreContext.php index a8f9e76560d0..8706b14d5abf 100644 --- a/tests/acceptance/features/bootstrap/NotificationsCoreContext.php +++ b/tests/acceptance/features/bootstrap/NotificationsCoreContext.php @@ -70,6 +70,7 @@ public function getDeletedNotification() { /** * @param int $deletedNotification + * * @return void */ public function setDeletedNotification($deletedNotification) { diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index 11ddd371e7a0..3500b646080c 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -224,6 +224,7 @@ public function userCreatesAPublicLinkShareOf($user, $path) { * @Given /^the user has created a public link share of (?:file|folder) "([^"]*)"$/ * * @param string $path + * * @return void */ public function aPublicLinkShareOfIsCreated($path) { diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index 08bd0f02d952..4701a2c8fb89 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -111,6 +111,7 @@ public function getNewDavPath() { * @Given /^using (old|new) (?:dav|DAV) path$/ * * @param string $oldOrNewDavPath + * * @return void */ public function usingOldOrNewDavPath($oldOrNewDavPath) { @@ -899,6 +900,7 @@ public function userHasSetPropertyOfEntryTo( * * @param string $propertyName * @param string $propertyValue + * * @return void * @throws \Exception */ diff --git a/tests/acceptance/features/bootstrap/WebUIAdminSharingSettingsContext.php b/tests/acceptance/features/bootstrap/WebUIAdminSharingSettingsContext.php index 546230f06198..f019a834e0a8 100644 --- a/tests/acceptance/features/bootstrap/WebUIAdminSharingSettingsContext.php +++ b/tests/acceptance/features/bootstrap/WebUIAdminSharingSettingsContext.php @@ -65,6 +65,7 @@ public function theAdminBrowsesToTheAdminSharingSettingsPage() { /** * @When /^the administrator (enables|disables) the share API using the webUI$/ + * * @param string $action * * @return void @@ -78,6 +79,7 @@ public function adminTogglesShareApiUsingTheWebui($action) { /** * @When /^the administrator (enables|disables) share via link using the webUI$/ + * * @param string $action * * @return void @@ -91,6 +93,7 @@ public function adminTogglesShareViaLink($action) { /** * @When /^the administrator (enables|disables) public uploads using the webUI$/ + * * @param string $action * * @return void @@ -104,6 +107,7 @@ public function adminTogglesPublicUpload($action) { /** * @When /^the administrator (enables|disables) mail notification on public link share using the webUI$/ + * * @param string $action * * @return void @@ -117,6 +121,7 @@ public function adminTogglesMailNotificationOnPublicLinkShare($action) { /** * @When /^the administrator (enables|disables) social media share on public link share using the webUI$/ + * * @param string $action * * @return void @@ -130,6 +135,7 @@ public function adminTogglesSocialShareOnPublicLinkShare($action) { /** * @When /^the administrator (enables|disables) enforce password protection for read-only links using the webUI$/ + * * @param string $action * * @return void @@ -143,6 +149,7 @@ public function adminTogglesEnforcePasswordProtectionForReadOnlyLinks($action) { /** * @When /^the administrator (enables|disables) enforce password protection for read and write links using the webUI$/ + * * @param string $action * * @return void @@ -156,6 +163,7 @@ public function adminTogglesEnforcePasswordProtectionForReadWriteLinks($action) /** * @When /^the administrator (enables|disables) enforce password protection for upload only links using the webUI$/ + * * @param string $action * * @return void @@ -169,6 +177,7 @@ public function adminTogglesEnforcePasswordProtectionForWriteOnlyLinks($action) /** * @When /^the administrator (enables|disables) resharing using the webUI$/ + * * @param string $action * * @return void @@ -182,6 +191,7 @@ public function adminTogglesDisableResharing($action) { /** * @When /^the administrator (enables|disables) sharing with groups using the webUI$/ + * * @param string $action * * @return void @@ -195,6 +205,7 @@ public function adminTogglesSharingWithGroupUsingTheWebui($action) { /** * @When /^the administrator (enables|disables) restrict users to only share with their group members using the webUI$/ + * * @param string $action * * @return void diff --git a/tests/acceptance/features/bootstrap/WebUIFilesContext.php b/tests/acceptance/features/bootstrap/WebUIFilesContext.php index bc7574f9bff9..ded283689772 100644 --- a/tests/acceptance/features/bootstrap/WebUIFilesContext.php +++ b/tests/acceptance/features/bootstrap/WebUIFilesContext.php @@ -205,6 +205,7 @@ public function theUserBrowsesToTheFilesPage() { * @param string $tabName * @param string $fileName * @param string $folderName + * * @return void * @throws Exception */ @@ -416,6 +417,7 @@ public function thereShouldBeNoFilesFoldersListedOnTheWebUI() { * @Then there should be exactly :count folder/folders listed on the webUI * * @param string $count that is numeric + * * @return void */ public function thereShouldBeCountFilesFoldersListedOnTheWebUI($count) { @@ -920,17 +922,17 @@ public function theDeletedElementsShouldBeListedInTheTrashbinOnTheWebUI() { * @Then /^the (?:file|folder) ((?:'[^']*')|(?:"[^"]*")) with the path ((?:'[^']*')|(?:"[^"]*")) should (not|)\s?be listed\s?(?:in the |)(files page|trashbin|favorites page|shared-with-you page|)\s?(?:folder ((?:'[^']*')|(?:"[^"]*")))? on the webUI$/ * * @param string $name enclosed in single or double quotes + * @param string $path * @param string $shouldOrNot * @param string $typeOfFilesPage * @param string $folder - * @param string $path * * @return void * @throws \Exception */ public function theFileFolderWithThePathShouldBeListedOnTheWebUI( $name, $path, $shouldOrNot, $typeOfFilesPage = "", $folder = "" - ) { + ) { // The capturing groups of the regex include the quotes at each // end of the captured string, so trim them. if ($folder !== "") { @@ -938,12 +940,12 @@ public function theFileFolderWithThePathShouldBeListedOnTheWebUI( } $path = \trim($path, $path[0]); $this->checkIfFileFolderIsListedOnTheWebUI( - \trim($name, $name[0]), - $shouldOrNot, - $typeOfFilesPage, - $folder, - $path - ); + \trim($name, $name[0]), + $shouldOrNot, + $typeOfFilesPage, + $folder, + $path + ); } /** diff --git a/tests/acceptance/features/bootstrap/WebUISearchContext.php b/tests/acceptance/features/bootstrap/WebUISearchContext.php index 8bf32a4fd7de..a3abac68e384 100644 --- a/tests/acceptance/features/bootstrap/WebUISearchContext.php +++ b/tests/acceptance/features/bootstrap/WebUISearchContext.php @@ -84,8 +84,12 @@ public function theUserSearchesUsingTheWebUI($searchTerm) { /** * @Then /^the (?:file|folder) ((?:'[^']*')|(?:"[^"]*")) with the path ((?:'[^']*')|(?:"[^"]*")) should (not|)\s?be listed in the search results in other folders section on the webUI$/ + * * @param string $fileName * @param string $path + * @param string $shouldOrNot + * + * @return void */ public function fileShouldBeListedSearchResultOtherFolders($fileName, $path, $shouldOrNot) { $fileName = \trim($fileName, $fileName[0]); @@ -100,6 +104,10 @@ public function fileShouldBeListedSearchResultOtherFolders($fileName, $path, $sh * @Then /^the (?:file|folder) ((?:'[^']*')|(?:"[^"]*")) should (not|)\s?be listed in the search results in other folders section on the webUI$/ * * @param string $fileName + * @param string $shouldOrNot + * + * @return void + * @throws Exception */ public function fileShouldNotBeListedSearchResultOtherFolders($fileName, $shouldOrNot) { $fileName = \trim($fileName, $fileName[0]); diff --git a/tests/acceptance/features/bootstrap/WebUISharingContext.php b/tests/acceptance/features/bootstrap/WebUISharingContext.php index ed464a5ba679..4833e405f949 100644 --- a/tests/acceptance/features/bootstrap/WebUISharingContext.php +++ b/tests/acceptance/features/bootstrap/WebUISharingContext.php @@ -565,6 +565,7 @@ public function userReactsToShareOfferedByUsingWebUI( * @When the public accesses the last created public link with password :password using the webUI * * @param string $password + * * @return void */ public function thePublicAccessesPublicLinkWithPasswordUsingTheWebui($password) { @@ -580,6 +581,7 @@ public function thePublicAccessesPublicLinkWithPasswordUsingTheWebui($password) * @When the public tries to access the last created public link with wrong password :wrongPassword using the webUI * * @param string $wrongPassword + * * @return void */ public function thePublicTriesToAccessPublicLinkWithWrongPasswordUsingTheWebui($wrongPassword) { diff --git a/tests/acceptance/features/bootstrap/WebUIUserContext.php b/tests/acceptance/features/bootstrap/WebUIUserContext.php index 1902a40d8516..df677a881766 100644 --- a/tests/acceptance/features/bootstrap/WebUIUserContext.php +++ b/tests/acceptance/features/bootstrap/WebUIUserContext.php @@ -51,6 +51,7 @@ public function __construct(OwncloudPage $owncloudPage) { * @Then :displayname should be shown as the name of the current user on the WebUI * * @param string $displayname + * * @return void */ public function displayNameOfTheCurrentUserOnTheWebUiShouldBe($displayname) { diff --git a/tests/acceptance/features/lib/FavoritesPage.php b/tests/acceptance/features/lib/FavoritesPage.php index be0b63087f39..f846905c5e71 100644 --- a/tests/acceptance/features/lib/FavoritesPage.php +++ b/tests/acceptance/features/lib/FavoritesPage.php @@ -69,9 +69,11 @@ protected function getEmptyContentXpath() { } /** - * * {@inheritDoc} + * * @see \Page\FilesPageBasic::getFilePathInRowXpath() + * + * @return void */ protected function getFilePathInRowXpath() { return $this->filePathInRowXpath; diff --git a/tests/acceptance/features/lib/FilesPage.php b/tests/acceptance/features/lib/FilesPage.php index dd23e888926f..289b0d2cd725 100644 --- a/tests/acceptance/features/lib/FilesPage.php +++ b/tests/acceptance/features/lib/FilesPage.php @@ -79,9 +79,11 @@ protected function getEmptyContentXpath() { } /** - * * {@inheritDoc} + * * @see \Page\FilesPageBasic::getFilePathInRowXpath() + * + * @return void */ protected function getFilePathInRowXpath() { throw new \Exception("not implemented in FilesPage"); diff --git a/tests/acceptance/features/lib/FilesPageBasic.php b/tests/acceptance/features/lib/FilesPageBasic.php index 7c5bdf1aed2b..e37252daa0fd 100644 --- a/tests/acceptance/features/lib/FilesPageBasic.php +++ b/tests/acceptance/features/lib/FilesPageBasic.php @@ -238,6 +238,7 @@ public function findFileRowByName($name, Session $session) { * useful for pages where multiple files with the same name can be displayed * * @param string|array $name + * @param string $path * @param Session $session * * @return FileRow diff --git a/tests/acceptance/features/lib/FilesPageElement/FavoritesFileRow.php b/tests/acceptance/features/lib/FilesPageElement/FavoritesFileRow.php index a5f6013c41cf..ff547e613c4b 100644 --- a/tests/acceptance/features/lib/FilesPageElement/FavoritesFileRow.php +++ b/tests/acceptance/features/lib/FilesPageElement/FavoritesFileRow.php @@ -32,6 +32,11 @@ * Object of a row on the FilesPage */ class FavoritesFileRow extends FileRow { + /** + * @param string $xpath + * + * @return null|string + */ public function getFilePath($xpath) { $filePath = $this->rowElement->getAttribute("data-path"); return $filePath; diff --git a/tests/acceptance/features/lib/FilesPageElement/FileRow.php b/tests/acceptance/features/lib/FilesPageElement/FileRow.php index a8c10b1b1333..c538d09a5cdd 100644 --- a/tests/acceptance/features/lib/FilesPageElement/FileRow.php +++ b/tests/acceptance/features/lib/FilesPageElement/FileRow.php @@ -271,6 +271,7 @@ public function getTooltip() { * return the path of the current file * * @param string $xpath xpath related to the fileRow element + * * @throws ElementNotFoundException * @return string */ diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php index 9aac10d8f636..f9bbfd82c215 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php @@ -110,6 +110,7 @@ public function getLinkName() { * @param string $permissions * * @return void + * @throws ElementNotFoundException */ public function setLinkPermissions($permissions) { $permissions = \strtolower($permissions); @@ -136,6 +137,7 @@ public function setLinkPermissions($permissions) { * @param string $password * * @return void + * @throws ElementNotFoundException */ public function setLinkPassword($password) { $passwordInput = $this->popupElement->find( @@ -156,6 +158,7 @@ public function setLinkPassword($password) { * @param string $date * * @return void + * @throws ElementNotFoundException */ public function setLinkExpirationDate($date) { $expirationDateInput = $this->popupElement->find( @@ -187,6 +190,7 @@ public function setLinkExpirationDate($date) { * @param string $email * * @return void + * @throws ElementNotFoundException */ public function setLinkEmail($email) { $emailInput = $this->popupElement->find("xpath", $this->emailInputXpath); @@ -222,6 +226,7 @@ public function unsetLinkEmail($email) { /** * * @return void + * @throws ElementNotFoundException */ public function setEmailToSelf() { $checkbox = $this->popupElement->find("xpath", $this->emailToSelfCheckboxXpath); @@ -231,7 +236,7 @@ public function setEmailToSelf() { " xpath $this->emailToSelfCheckboxXpath" . " could not find the checkbox for sending the self copy of email of the public link. " . " Maybe the email isn't filled." - ); + ); } $checkbox->click(); } @@ -240,6 +245,7 @@ public function setEmailToSelf() { * @param string $personalMessage * * @return void + * @throws ElementNotFoundException */ public function setPersonalMessage($personalMessage) { $personalMessageInput = $this->popupElement->find("xpath", $this->personalMessageInputXpath); @@ -248,7 +254,7 @@ public function setPersonalMessage($personalMessage) { __METHOD__ . " xpath $this->personalMessageInputXpath" . " could not find the input field for sending a personal message in the email." - ); + ); } $this->waitTillElementIsNotNull($this->personalMessageInputXpath); $personalMessageInput->focus(); @@ -258,6 +264,7 @@ public function setPersonalMessage($personalMessage) { /** * * @return void + * @throws ElementNotFoundException */ public function save() { $saveButton = $this->popupElement->find("xpath", $this->shareButtonXpath); @@ -271,6 +278,11 @@ public function save() { $saveButton->click(); } + /** + * + * @return void + * @throws ElementNotFoundException + */ public function close() { $closeButton = $this->popupElement->find("xpath", $this->popupCloseButton); if ($closeButton === null) { @@ -278,7 +290,7 @@ public function close() { __METHOD__ . " xpath $this->popupCloseButton" . " could not find save button of the public link popup" - ); + ); } $closeButton->click(); } diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php index 90df4eed1b03..6f3e077ad516 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php @@ -76,12 +76,13 @@ public function initElement() { /** * * @param Session $session - * @param string $name - * @param string $permissions - * @param string $password - * @param string $expirationDate - * @param string $email - * @param bool $emailToSelf + * @param string|null $name + * @param string|null $permissions + * @param string|null $password + * @param string|null $expirationDate + * @param string|null $email + * @param bool|null $emailToSelf + * @param string|null $personalMessage * * @return string the name of the created public link */ @@ -134,13 +135,13 @@ public function createLink( public function openSharingPopup() { $createLinkBtn = $this->publicLinkTabElement->find( "xpath", $this->createLinkBtnXpath - ); + ); if ($createLinkBtn === null) { throw new ElementNotFoundException( __METHOD__ . " xpath $this->createLinkBtnXpath" . " could not find create public link button" - ); + ); } $createLinkBtn->click(); diff --git a/tests/acceptance/features/lib/FilesPageElement/TrashBinFileRow.php b/tests/acceptance/features/lib/FilesPageElement/TrashBinFileRow.php index a51ca344fe29..3143b2cef656 100644 --- a/tests/acceptance/features/lib/FilesPageElement/TrashBinFileRow.php +++ b/tests/acceptance/features/lib/FilesPageElement/TrashBinFileRow.php @@ -32,6 +32,11 @@ * Object of a row on the FilesPage */ class TrashBinFileRow extends FileRow { + /** + * @param string $xpath + * + * @return null|string + */ public function getFilePath($xpath) { $fileRowLabel = $this->rowElement->find("xpath", $xpath); $filePath = $fileRowLabel->getAttribute("data-original-title"); diff --git a/tests/acceptance/features/lib/LoginPage.php b/tests/acceptance/features/lib/LoginPage.php index 4e20df6b2dab..6fbade3481a0 100644 --- a/tests/acceptance/features/lib/LoginPage.php +++ b/tests/acceptance/features/lib/LoginPage.php @@ -138,7 +138,6 @@ public function getLostPasswordMessage() { /** * * @param string $newPassword - * * @param Session $session * * @return void diff --git a/tests/acceptance/features/lib/OwncloudPage.php b/tests/acceptance/features/lib/OwncloudPage.php index 3282ad4edb91..3eac9d9126b9 100644 --- a/tests/acceptance/features/lib/OwncloudPage.php +++ b/tests/acceptance/features/lib/OwncloudPage.php @@ -308,7 +308,9 @@ public function isAvatarVisible() { * * @param Session $session * @param string $searchTerm + * * @throws ElementNotFoundException + * @return void */ public function search($session, $searchTerm) { $searchbox = $this->findById($this->searchBoxId); @@ -329,6 +331,7 @@ public function search($session, $searchTerm) { $searchResultInOtherFoldersPage = $this->getPage("SearchResultInOtherFoldersPage"); $searchResultInOtherFoldersPage->waitTillPageIsLoaded($session); } + /** * return the path to the relevant page * diff --git a/tests/acceptance/features/lib/PublicLinkFilesPage.php b/tests/acceptance/features/lib/PublicLinkFilesPage.php index abd9075050e3..7d365df5e32b 100644 --- a/tests/acceptance/features/lib/PublicLinkFilesPage.php +++ b/tests/acceptance/features/lib/PublicLinkFilesPage.php @@ -74,9 +74,12 @@ protected function getEmptyContentXpath() { } /** - * * {@inheritDoc} + * * @see \Page\FilesPageBasic::getFilePathInRowXpath() + * + * @throws \Exception + * @return void */ protected function getFilePathInRowXpath() { throw new \Exception("not implemented in PublicLinkFilesPage"); @@ -176,7 +179,7 @@ public function getPreviewText() { if ($previewContainer === null) { throw new ElementNotFoundException( __METHOD__ . - " xpath $this->textPreviewContainerXpath ". + " xpath $this->textPreviewContainerXpath " . " could not find preview text container" ); } @@ -193,8 +196,9 @@ public function getDownloadUrl() { $downloadBtn = $this->find("xpath", $this->singleFileDownloadBtnXpath); if ($downloadBtn === null) { throw new ElementNotFoundException( - __METHOD__ . " xpath $this->singleFileDownloadBtnXpath ". - " could not find download button"); + __METHOD__ . " xpath $this->singleFileDownloadBtnXpath " . + " could not find download button" + ); } if ($downloadBtn->hasAttribute("href")) { return $downloadBtn->getAttribute("href"); @@ -299,7 +303,9 @@ public function waitTillPageIsLoaded( $end = $currentTime + ($timeout_msec / 1000); while ($currentTime <= $end) { $fileList = $this->find('xpath', $this->getFileListXpath()); - $downloadButton = $this->find("xpath", $this->singleFileDownloadBtnXpath); + $downloadButton = $this->find( + "xpath", $this->singleFileDownloadBtnXpath + ); if ($fileList !== null) { try { $fileListIsVisible = $fileList->isVisible(); @@ -313,7 +319,7 @@ public function waitTillPageIsLoaded( . "\n-------------------------\n" . $e->getMessage() . "\n-------------------------\n" - ); + ); $fileListIsVisible = false; } catch (StaleElementReference $e) { // Somehow on Edge this can throw StaleElementReference @@ -325,7 +331,7 @@ public function waitTillPageIsLoaded( . "\n-------------------------\n" . $e->getMessage() . "\n-------------------------\n" - ); + ); $fileListIsVisible = false; } @@ -338,7 +344,7 @@ public function waitTillPageIsLoaded( $emptyContentElement = $this->find( "xpath", $this->getEmptyContentXpath() - ); + ); if ($emptyContentElement !== null) { if (!$emptyContentElement->hasClass("hidden")) { diff --git a/tests/acceptance/features/lib/SearchResultInOtherFoldersPage.php b/tests/acceptance/features/lib/SearchResultInOtherFoldersPage.php index e4639b4fd8db..822cbf4c0c05 100644 --- a/tests/acceptance/features/lib/SearchResultInOtherFoldersPage.php +++ b/tests/acceptance/features/lib/SearchResultInOtherFoldersPage.php @@ -31,23 +31,38 @@ class SearchResultInOtherFoldersPage extends FilesPageBasic { protected $fileNameMatchXpath = "//div[@class='name' and .=%s]"; protected $fileNamesXpath = "//div[@class='name']"; protected $filePathInRowXpath = "//div[@class='path']"; - + + /** + * @return string + */ protected function getEmptyContentXpath() { return $this->emptyContentXpath; } + /** + * @return string + */ protected function getFileNameMatchXpath() { return $this->fileNameMatchXpath; } + /** + * @return string + */ protected function getFileNamesXpath() { return $this->fileNamesXpath; } + /** + * @return string + */ protected function getFileListXpath() { return $this->fileListXpath; } - + + /** + * @return string + */ protected function getFilePathInRowXpath() { return $this->filePathInRowXpath; } diff --git a/tests/acceptance/features/lib/SharedWithYouPage.php b/tests/acceptance/features/lib/SharedWithYouPage.php index acbe91315000..8ba6560b013f 100644 --- a/tests/acceptance/features/lib/SharedWithYouPage.php +++ b/tests/acceptance/features/lib/SharedWithYouPage.php @@ -68,9 +68,11 @@ protected function getEmptyContentXpath() { } /** - * * {@inheritDoc} + * * @see \Page\FilesPageBasic::getFilePathInRowXpath() + * + * @return void */ protected function getFilePathInRowXpath() { throw new \Exception("not implemented in SharedWithYouPage"); diff --git a/tests/acceptance/features/lib/TrashbinPage.php b/tests/acceptance/features/lib/TrashbinPage.php index 22a1dfc2eb2e..8291c41345c3 100644 --- a/tests/acceptance/features/lib/TrashbinPage.php +++ b/tests/acceptance/features/lib/TrashbinPage.php @@ -74,9 +74,11 @@ protected function getEmptyContentXpath() { } /** - * * {@inheritDoc} + * * @see \Page\FilesPageBasic::getFilePathInRowXpath() + * + * @return void */ protected function getFilePathInRowXpath() { return $this->filePathInRowXpath;