aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r--tests/acceptance/features/bootstrap/FileListContext.php16
-rw-r--r--tests/acceptance/features/bootstrap/FilesAppSharingContext.php4
2 files changed, 15 insertions, 5 deletions
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php
index 5f66c0fbbb0..ce2bd9971e0 100644
--- a/tests/acceptance/features/bootstrap/FileListContext.php
+++ b/tests/acceptance/features/bootstrap/FileListContext.php
@@ -126,7 +126,7 @@ class FileListContext implements Context, ActorAwareInterface {
* @return Locator
*/
public static function createNewFolderMenuItemNameInput($fileListAncestor) {
- return Locator::forThe()->css(".filenameform input")->
+ return Locator::forThe()->css(".filenameform input[type=text]")->
descendantOf(self::createNewFolderMenuItem($fileListAncestor))->
describedAs("Name input in create new folder menu item in file list");
}
@@ -134,6 +134,15 @@ class FileListContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
+ public static function createNewFolderMenuItemConfirmButton($fileListAncestor) {
+ return Locator::forThe()->css(".filenameform input[type=submit]")->
+ descendantOf(self::createNewFolderMenuItem($fileListAncestor))->
+ describedAs("Confirm button in create new folder menu item in file list");
+ }
+
+ /**
+ * @return Locator
+ */
public static function fileListHeader($fileListAncestor) {
return Locator::forThe()->css("thead")->
descendantOf($fileListAncestor)->
@@ -356,7 +365,8 @@ class FileListContext implements Context, ActorAwareInterface {
$this->actor->find(self::createMenuButton($this->fileListAncestor), 10)->click();
$this->actor->find(self::createNewFolderMenuItem($this->fileListAncestor), 2)->click();
- $this->actor->find(self::createNewFolderMenuItemNameInput($this->fileListAncestor), 2)->setValue($folderName . "\r");
+ $this->actor->find(self::createNewFolderMenuItemNameInput($this->fileListAncestor), 2)->setValue($folderName);
+ $this->actor->find(self::createNewFolderMenuItemConfirmButton($this->fileListAncestor), 2)->click();
}
/**
@@ -410,7 +420,7 @@ class FileListContext implements Context, ActorAwareInterface {
// This should not be a problem, though, as the default behaviour is to
// bring the browser window to the foreground when switching to a
// different actor.
- $this->actor->find(self::renameInputForFile($this->fileListAncestor, $fileName1), 10)->setValue($fileName2 . "\r");
+ $this->actor->find(self::renameInputForFile($this->fileListAncestor, $fileName1), 10)->setValue($fileName2);
}
/**
diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
index 4540d7ae48d..e8515fa1124 100644
--- a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
+++ b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
@@ -372,8 +372,8 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
self::shareLinkMenu($shareLinkMenuTriggerElement),
$timeout = 2 * $this->actor->getFindTimeoutMultiplier())) {
// It may not be possible to click on the menu button (due to the
- // menu itself covering it), so "Esc" key is pressed instead.
- $this->actor->find(self::shareLinkMenu($shareLinkMenuTriggerElement), 2)->getWrappedElement()->keyPress(27);
+ // menu itself covering it), so "Enter" key is pressed instead.
+ $this->actor->find(self::shareLinkMenuButton(), 2)->getWrappedElement()->keyPress(13);
}
$this->actor->find(self::copyLinkButton(), 10)->click();