MDL-69371 behat: Update to step definition.
authorabgreeve <adrian@moodle.com>
Fri, 22 Oct 2021 02:32:14 +0000 (10:32 +0800)
committerabgreeve <adrian@moodle.com>
Fri, 22 Oct 2021 02:32:14 +0000 (10:32 +0800)
This extends the step to look for the file manager on
admin pages as well which has a slightly different html
signature to look for.

theme/classic/tests/behat/behat_theme_classic_behat_repository_upload.php

index 365548f..efd6666 100644 (file)
@@ -64,7 +64,7 @@ class behat_theme_classic_behat_repository_upload extends behat_repository_uploa
             $filepickercontainer = $this->find(
                 'xpath',
                 "//input[./@id = substring-before(//p[normalize-space(.)=$filepickerelement]/@id, '_label')]" .
-                    "//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' felement ')]",
+                    "//ancestor::*[@data-fieldtype = 'filemanager' or @data-fieldtype = 'filepicker']",
                 $exception
             );
         }