summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/FileListContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap/FileListContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/FileListContext.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php
index 5206e6417de..90d2aeebdc5 100644
--- a/tests/acceptance/features/bootstrap/FileListContext.php
+++ b/tests/acceptance/features/bootstrap/FileListContext.php
@@ -187,6 +187,15 @@ class FileListContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
+ public static function commentActionForFile($fileListAncestor, $fileName) {
+ return Locator::forThe()->css(".action-comment")->
+ descendantOf(self::rowForFile($fileListAncestor, $fileName))->
+ describedAs("Comment action for file $fileName in file list");
+ }
+
+ /**
+ * @return Locator
+ */
public static function shareActionForFile($fileListAncestor, $fileName) {
return Locator::forThe()->css(".action-share")->
descendantOf(self::rowForFile($fileListAncestor, $fileName))->
@@ -348,6 +357,13 @@ class FileListContext implements Context, ActorAwareInterface {
}
/**
+ * @When I open the unread comments for :fileName
+ */
+ public function iOpenTheUnreadCommentsFor($fileName) {
+ $this->actor->find(self::commentActionForFile($this->fileListAncestor, $fileName), 10)->click();
+ }
+
+ /**
* @Then I see that the file list is eventually loaded
*/
public function iSeeThatTheFileListIsEventuallyLoaded() {
@@ -396,4 +412,11 @@ class FileListContext implements Context, ActorAwareInterface {
PHPUnit_Framework_Assert::assertNotNull($this->actor->find(self::notFavoritedStateIconForFile($this->fileListAncestor, $fileName), 10));
}
+ /**
+ * @Then I see that :fileName has unread comments
+ */
+ public function iSeeThatHasUnreadComments($fileName) {
+ PHPUnit_Framework_Assert::assertTrue($this->actor->find(self::commentActionForFile($this->fileListAncestor, $fileName), 10)->isVisible());
+ }
+
}