summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-15 16:34:48 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-15 17:48:07 +0100
commit28d5862643b5a2b472b511b53d872fb082b1d6eb (patch)
tree875eba89db588a776fca36b1831d2dcb85c98e56 /tests/acceptance
parentc4478f629777452a9a3e0b280ae14c5e4970e50a (diff)
downloadnextcloud-server-28d5862643b5a2b472b511b53d872fb082b1d6eb.tar.gz
nextcloud-server-28d5862643b5a2b472b511b53d872fb082b1d6eb.zip
Move locators above step definitions
The locators are moved above the step definitions for consistency with other context files; besides that I made some minor adjustments for consistency too in the locator descriptions and identation, and moved the locators for ".newCommentRow" descendants together. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r--tests/acceptance/features/bootstrap/CommentsAppContext.php47
1 files changed, 26 insertions, 21 deletions
diff --git a/tests/acceptance/features/bootstrap/CommentsAppContext.php b/tests/acceptance/features/bootstrap/CommentsAppContext.php
index 64d1dc69bc4..83a2476eb91 100644
--- a/tests/acceptance/features/bootstrap/CommentsAppContext.php
+++ b/tests/acceptance/features/bootstrap/CommentsAppContext.php
@@ -26,6 +26,32 @@ use Behat\Behat\Context\Context;
class CommentsAppContext implements Context, ActorAwareInterface {
use ActorAware;
+ /**
+ * @return Locator
+ */
+ public static function newCommentField() {
+ return Locator::forThe()->css("div.newCommentRow .message")->
+ descendantOf(FilesAppContext::currentSectionDetailsView())->
+ describedAs("New comment field in current section details view in Files app");
+ }
+
+ /**
+ * @return Locator
+ */
+ public static function submitNewCommentButton() {
+ return Locator::forThe()->css("div.newCommentRow .submit")->
+ descendantOf(FilesAppContext::currentSectionDetailsView())->
+ describedAs("Submit new comment button in current section details view in Files app");
+ }
+
+ /**
+ * @return Locator
+ */
+ public static function commentFields() {
+ return Locator::forThe()->css(".comments .comment .message")->
+ descendantOf(FilesAppContext::currentSectionDetailsView())->
+ describedAs("Comment fields in current section details view in Files app");
+ }
/**
* @When /^I create a new comment with "([^"]*)" as message$/
@@ -58,25 +84,4 @@ class CommentsAppContext implements Context, ActorAwareInterface {
}
return true;
}
-
- /**
- * @return Locator
- */
- public static function newCommentField() {
- return Locator::forThe()->css("div.newCommentRow .message")->descendantOf(FilesAppContext::currentSectionDetailsView())->
- describedAs("New comment field in the details view in Files app");
- }
-
- public static function commentFields() {
- return Locator::forThe()->css(".comments .comment .message")->descendantOf(FilesAppContext::currentSectionDetailsView())->
- describedAs("Comment fields in the details view in Files app");
- }
-
- /**
- * @return Locator
- */
- public static function submitNewCommentButton() {
- return Locator::forThe()->css("div.newCommentRow .submit")->descendantOf(FilesAppContext::currentSectionDetailsView())->
- describedAs("Submit new comment button in the details view in Files app");
- }
}