Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/acceptance/features/bootstrap/FilePickerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public static function fileListContainer() {
* @return Locator
*/
public static function rowForFile($fileName) {
return Locator::forThe()->xpath("//*[@id = 'picker-filestable']//*[contains(concat(' ', normalize-space(@class), ' '), ' filename ') and normalize-space() = '$fileName']/ancestor::tr")->
// File names in the file picker are split in two span elements, so
// their texts need to be concatenated to get the full file name.
return Locator::forThe()->xpath("//*[@id = 'picker-filestable']//*[contains(concat(' ', normalize-space(@class), ' '), ' filename-parts ') and concat(span[1], span[2]) = '$fileName']/ancestor::tr")->
descendantOf(self::fileListContainer())->
describedAs("Row for file $fileName in the file picker dialog");
}
Expand Down