summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/acceptance/features/app-files.feature16
-rw-r--r--tests/acceptance/features/bootstrap/FilesAppContext.php16
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/acceptance/features/app-files.feature b/tests/acceptance/features/app-files.feature
index 37e01bcada2..ac2d05fac2c 100644
--- a/tests/acceptance/features/app-files.feature
+++ b/tests/acceptance/features/app-files.feature
@@ -145,6 +145,14 @@ Feature: app-files
Given I am logged in
And I create a new folder named "A name alphabetically lower than welcome.txt"
And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
+ # To mark the file as favorite the file actions menu has to be shown but, as
+ # the details view is opened automatically when the folder is created,
+ # clicking on the menu trigger could fail if it is covered by the details
+ # view due to its opening animation. Instead of ensuring that the animations
+ # of the contents and the details view have both finished it is easier to
+ # close the details view and wait until it is closed before continuing.
+ And I close the details view
+ And I see that the details view is closed
When I mark "welcome.txt" as favorite
Then I see that "welcome.txt" is marked as favorite
And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
@@ -153,6 +161,14 @@ Feature: app-files
Given I am logged in
And I create a new folder named "A name alphabetically lower than welcome.txt"
And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
+ # To mark the file as favorite the file actions menu has to be shown but, as
+ # the details view is opened automatically when the folder is created,
+ # clicking on the menu trigger could fail if it is covered by the details
+ # view due to its opening animation. Instead of ensuring that the animations
+ # of the contents and the details view have both finished it is easier to
+ # close the details view and wait until it is closed before continuing.
+ And I close the details view
+ And I see that the details view is closed
And I mark "welcome.txt" as favorite
And I see that "welcome.txt" is marked as favorite
And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php
index eee03973dc8..338823a9478 100644
--- a/tests/acceptance/features/bootstrap/FilesAppContext.php
+++ b/tests/acceptance/features/bootstrap/FilesAppContext.php
@@ -80,6 +80,15 @@ class FilesAppContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
+ public static function closeDetailsViewButton() {
+ return Locator::forThe()->css(".icon-close")->
+ descendantOf(self::currentSectionDetailsView())->
+ describedAs("Close current section details view in Files app");
+ }
+
+ /**
+ * @return Locator
+ */
public static function fileDetailsInCurrentSectionDetailsViewWithText($fileDetailsText) {
return Locator::forThe()->xpath("//span[normalize-space() = '$fileDetailsText']")->
descendantOf(self::fileDetailsInCurrentSectionDetailsView())->
@@ -388,6 +397,13 @@ class FilesAppContext implements Context, ActorAwareInterface {
}
/**
+ * @Given I close the details view
+ */
+ public function iCloseTheDetailsView() {
+ $this->actor->find(self::closeDetailsViewButton(), 10)->click();
+ }
+
+ /**
* @Given I open the input field for tags in the details view
*/
public function iOpenTheInputFieldForTagsInTheDetailsView() {