Skip to content
Snippets Groups Projects
Unverified Commit f73f7bbf authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #14947 from...

Merge pull request #14947 from nextcloud/adjust-acceptance-tests-to-changes-of-file-names-in-file-picker

Adjust acceptance tests to changes of file names in file picker
parents 39d13403 ace44499
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,9 @@ class FilePickerContext implements Context, ActorAwareInterface { ...@@ -48,7 +48,9 @@ class FilePickerContext implements Context, ActorAwareInterface {
* @return Locator * @return Locator
*/ */
public static function rowForFile($fileName) { 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())-> descendantOf(self::fileListContainer())->
describedAs("Row for file $fileName in the file picker dialog"); describedAs("Row for file $fileName in the file picker dialog");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment