diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-04-03 17:29:52 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-04-03 17:29:52 +0300 |
commit | ace44499246124663d3e602e6462e5cc4b7d0c55 (patch) | |
tree | 16ad0f8d5125f76e60293a339fd1a6772d47a9c6 /tests | |
parent | 39d134037130fb24173efc55440f5ab7fc91d812 (diff) |
Adjust acceptance tests to changes of file names in file picker
File names are no longer shown directly in the ".filename" element, but
split in two "span" elements inside a ".filename-parts" element, so now
the texts in those span elements need to be concatenated to get the file
name.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/features/bootstrap/FilePickerContext.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/acceptance/features/bootstrap/FilePickerContext.php b/tests/acceptance/features/bootstrap/FilePickerContext.php index c62a505f705..d7659dbac8e 100644 --- a/tests/acceptance/features/bootstrap/FilePickerContext.php +++ b/tests/acceptance/features/bootstrap/FilePickerContext.php @@ -48,7 +48,9 @@ class FilePickerContext implements Context, ActorAwareInterface { * @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"); } |