|
|
|
|
@ -86,6 +86,15 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
describedAs("Close current section details view in Files app");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
public static function fileNameInCurrentSectionDetailsView() {
|
|
|
|
|
return Locator::forThe()->css(".fileName")->
|
|
|
|
|
descendantOf(self::currentSectionDetailsView())->
|
|
|
|
|
describedAs("File name in current section details view in Files app");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
@ -316,6 +325,14 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
describedAs("Main link for file $fileName in Files app");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
public static function renameInputForFile($fileName) {
|
|
|
|
|
return Locator::forThe()->css("input.filename")->descendantOf(self::rowForFile($fileName))->
|
|
|
|
|
describedAs("Rename input for file $fileName in Files app");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
@ -347,6 +364,13 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
return self::fileActionsMenuItemFor("Details");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
public static function renameMenuItem() {
|
|
|
|
|
return self::fileActionsMenuItemFor("Rename");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
@ -417,6 +441,17 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
$this->actor->find(self::tabHeaderInCurrentSectionDetailsViewNamed($tabName), 10)->click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Given I rename :fileName1 to :fileName2
|
|
|
|
|
*/
|
|
|
|
|
public function iRenameTo($fileName1, $fileName2) {
|
|
|
|
|
$this->actor->find(self::fileActionsMenuButtonForFile($fileName1), 10)->click();
|
|
|
|
|
|
|
|
|
|
$this->actor->find(self::renameMenuItem(), 2)->click();
|
|
|
|
|
|
|
|
|
|
$this->actor->find(self::renameInputForFile($fileName1), 10)->setValue($fileName2 . "\r");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Given I mark :fileName as favorite
|
|
|
|
|
*/
|
|
|
|
|
@ -542,6 +577,13 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that the file list contains a file named :fileName
|
|
|
|
|
*/
|
|
|
|
|
public function iSeeThatTheFileListContainsAFileNamed($fileName) {
|
|
|
|
|
PHPUnit_Framework_Assert::assertNotNull($this->actor->find(self::rowForFile($fileName), 10));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that :fileName1 precedes :fileName2 in the file list
|
|
|
|
|
*/
|
|
|
|
|
@ -563,6 +605,14 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|
|
|
|
PHPUnit_Framework_Assert::assertNotNull($this->actor->find(self::notFavoritedStateIconForFile($fileName), 10));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that the file name shown in the details view is :fileName
|
|
|
|
|
*/
|
|
|
|
|
public function iSeeThatTheFileNameShownInTheDetailsViewIs($fileName) {
|
|
|
|
|
PHPUnit_Framework_Assert::assertEquals(
|
|
|
|
|
$this->actor->find(self::fileNameInCurrentSectionDetailsView(), 10)->getText(), $fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that the input field for tags in the details view is shown
|
|
|
|
|
*/
|
|
|
|
|
|