diff --git a/tests/acceptance/features/lib/AdminAppsSettingsPage.php b/tests/acceptance/features/lib/AdminAppsSettingsPage.php index 6d01f472edb2..09db47858195 100644 --- a/tests/acceptance/features/lib/AdminAppsSettingsPage.php +++ b/tests/acceptance/features/lib/AdminAppsSettingsPage.php @@ -97,6 +97,8 @@ public function waitTillPageIsLoaded( $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { $this->waitForAjaxCallsToStartAndFinish($session); - $this->waitTillXpathIsVisible($session, $this->appEnableDisableButtonXpath); + $this->waitTillXpathIsVisible( + $this->appEnableDisableButtonXpath, $timeout_msec + ); } } diff --git a/tests/acceptance/features/lib/AdminGeneralSettingsPage.php b/tests/acceptance/features/lib/AdminGeneralSettingsPage.php index f48eb07337b8..ab7a0e91762b 100644 --- a/tests/acceptance/features/lib/AdminGeneralSettingsPage.php +++ b/tests/acceptance/features/lib/AdminGeneralSettingsPage.php @@ -293,6 +293,8 @@ public function waitTillPageIsLoaded( $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { $this->waitForAjaxCallsToStartAndFinish($session); - $this->waitTillXpathIsVisible($session, $this->ownCloudVersionStringXpath); + $this->waitTillXpathIsVisible( + $this->ownCloudVersionStringXpath, $timeout_msec + ); } } diff --git a/tests/acceptance/features/lib/AdminSharingSettingsPage.php b/tests/acceptance/features/lib/AdminSharingSettingsPage.php index 445cba628ef3..ab8433a50c87 100644 --- a/tests/acceptance/features/lib/AdminSharingSettingsPage.php +++ b/tests/acceptance/features/lib/AdminSharingSettingsPage.php @@ -388,6 +388,8 @@ public function waitTillPageIsLoaded( Session $session, $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { - $this->waitTillXpathIsVisible($session, $this->shareApiCheckboxXpath); + $this->waitTillXpathIsVisible( + $this->shareApiCheckboxXpath, $timeout_msec + ); } } diff --git a/tests/acceptance/features/lib/AdminStorageSettingsPage.php b/tests/acceptance/features/lib/AdminStorageSettingsPage.php index 98edec52483c..ae8d52448b92 100644 --- a/tests/acceptance/features/lib/AdminStorageSettingsPage.php +++ b/tests/acceptance/features/lib/AdminStorageSettingsPage.php @@ -335,6 +335,8 @@ public function waitTillPageIsLoaded( $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { $this->waitForAjaxCallsToStartAndFinish($session); - $this->waitTillXpathIsVisible($session, $this->filesExternalFormXpath); + $this->waitTillXpathIsVisible( + $this->filesExternalFormXpath, $timeout_msec + ); } } diff --git a/tests/acceptance/features/lib/FilesPageElement/FileActionsMenu.php b/tests/acceptance/features/lib/FilesPageElement/FileActionsMenu.php index 04328572a69e..40e8f602e604 100644 --- a/tests/acceptance/features/lib/FilesPageElement/FileActionsMenu.php +++ b/tests/acceptance/features/lib/FilesPageElement/FileActionsMenu.php @@ -74,10 +74,10 @@ public function waitTillPageIsLoaded( $xpath = null ) { if ($xpath === null) { - throw new \InvalidArgumentException('$xpath need to be set'); + throw new \InvalidArgumentException('$xpath needs to be set'); } $this->waitForOutstandingAjaxCalls($session); - $element = $this->waitTillXpathIsVisible($session, $xpath); + $element = $this->waitTillXpathIsVisible($xpath, $timeout_msec); $this->setElement($element); } diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php index 16e222b68a34..1913e8f82b0a 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php @@ -488,9 +488,9 @@ public function waitTillPageIsLoaded( $xpath = null ) { if ($xpath === null) { - throw new \InvalidArgumentException('$xpath need to be set'); + throw new \InvalidArgumentException('$xpath needs to be set'); } $this->waitForOutstandingAjaxCalls($session); - $this->waitTillXpathIsVisible($session, $xpath); + $this->waitTillXpathIsVisible($xpath, $timeout_msec); } } diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php index 10c6d4728987..6ebfeaf3178c 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php @@ -327,10 +327,10 @@ public function waitTillPageIsLoaded( $xpath = null ) { if ($xpath === null) { - throw new \InvalidArgumentException('$xpath need to be set'); + throw new \InvalidArgumentException('$xpath needs to be set'); } $this->waitForOutstandingAjaxCalls($session); - $popupElement = $this->waitTillXpathIsVisible($session, $xpath); + $popupElement = $this->waitTillXpathIsVisible($xpath, $timeout_msec); $this->setElement($popupElement); } } diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php index 95350bd2bff6..5e9db94c7ac9 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php @@ -83,10 +83,10 @@ public function waitTillPageIsLoaded( $xpath = null ) { if ($xpath === null) { - throw new \InvalidArgumentException('$xpath need to be set'); + throw new \InvalidArgumentException('$xpath needs to be set'); } $this->waitForOutstandingAjaxCalls($session); - $element = $this->waitTillXpathIsVisible($session, $xpath); + $element = $this->waitTillXpathIsVisible($xpath, $timeout_msec); $this->setElement($element); } diff --git a/tests/acceptance/features/lib/NotificationsAppDialog.php b/tests/acceptance/features/lib/NotificationsAppDialog.php index 5195796c1d61..351423e6643a 100644 --- a/tests/acceptance/features/lib/NotificationsAppDialog.php +++ b/tests/acceptance/features/lib/NotificationsAppDialog.php @@ -99,6 +99,8 @@ public function waitTillPageIsLoaded( Session $session, $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { - $this->waitTillXpathIsVisible($session, $this->notificationContainerXpath); + $this->waitTillXpathIsVisible( + $this->notificationContainerXpath, $timeout_msec + ); } } diff --git a/tests/acceptance/features/lib/OwncloudPage.php b/tests/acceptance/features/lib/OwncloudPage.php index 195e6117652a..dc6da5268151 100644 --- a/tests/acceptance/features/lib/OwncloudPage.php +++ b/tests/acceptance/features/lib/OwncloudPage.php @@ -146,14 +146,12 @@ public function waitTillElementIsNotNull( /** * waits for the element located by the xpath to be visible * - * @param Session $session * @param string $xpath the xpath of the element to wait for * @param int $timeout_msec * * @return NodeElement */ public function waitTillXpathIsVisible( - Session $session, $xpath, $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { @@ -162,13 +160,13 @@ public function waitTillXpathIsVisible( $element, __METHOD__ . " xpath: $xpath" . - " timeout waiting for element to be availiable" + " timeout waiting for element to be available" ); - $visibibity = $this->waitFor( - STANDARD_UI_WAIT_TIMEOUT_MILLISEC / 1000, + $visibility = $this->waitFor( + $timeout_msec / 1000, [$element, 'isVisible'] ); - if ($visibibity !== true) { + if ($visibility !== true) { throw new \Exception( __METHOD__ . " xpath: $xpath" . diff --git a/tests/acceptance/features/lib/OwncloudPageElement/SettingsMenu.php b/tests/acceptance/features/lib/OwncloudPageElement/SettingsMenu.php index a720cd856e56..f979d6d88821 100644 --- a/tests/acceptance/features/lib/OwncloudPageElement/SettingsMenu.php +++ b/tests/acceptance/features/lib/OwncloudPageElement/SettingsMenu.php @@ -61,6 +61,6 @@ public function waitTillPageIsLoaded( Session $session, $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { - $this->waitTillXpathIsVisible($session, $this->logoutButtonXpath); + $this->waitTillXpathIsVisible($this->logoutButtonXpath, $timeout_msec); } } diff --git a/tests/acceptance/features/lib/PersonalGeneralSettingsPage.php b/tests/acceptance/features/lib/PersonalGeneralSettingsPage.php index 88b6fb3afecd..f6df992ee9e2 100644 --- a/tests/acceptance/features/lib/PersonalGeneralSettingsPage.php +++ b/tests/acceptance/features/lib/PersonalGeneralSettingsPage.php @@ -83,7 +83,9 @@ public function waitTillPageIsLoaded( Session $session, $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { - $this->waitTillXpathIsVisible($session, $this->personalProfilePanelXpath); + $this->waitTillXpathIsVisible( + $this->personalProfilePanelXpath, $timeout_msec + ); $this->waitForOutstandingAjaxCalls($session); } diff --git a/tests/acceptance/features/lib/PersonalSecuritySettingsPage.php b/tests/acceptance/features/lib/PersonalSecuritySettingsPage.php index 3a493df42d8a..e5ddfdea85f3 100644 --- a/tests/acceptance/features/lib/PersonalSecuritySettingsPage.php +++ b/tests/acceptance/features/lib/PersonalSecuritySettingsPage.php @@ -150,6 +150,8 @@ public function waitTillPageIsLoaded( $timeout_msec = STANDARD_UI_WAIT_TIMEOUT_MILLISEC ) { $this->waitForOutstandingAjaxCalls($session); - $this->waitTillXpathIsVisible($session, $this->corsInputfieldXpath); + $this->waitTillXpathIsVisible( + $this->corsInputfieldXpath, $timeout_msec + ); } }