Skip to content

Commit

Permalink
MDL-60975 behat tests: Added search for admin setting filepickers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathrin84 committed Dec 5, 2019
1 parent 800563e commit 4805a5b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions repository/upload/tests/behat/behat_repository_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,15 @@ protected function get_filepicker_node($filepickerelement) {
$exception
);
} else {
// Gets the filemanager node specified by the locator which contains the filepicker container.
// Gets the filemanager node specified by the locator which contains the filepicker container
// either for filepickers created by mform or by admin config.
$filepickerelement = behat_context_helper::escape($filepickerelement);
$filepickercontainer = $this->find(
'xpath',
"//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" .
"//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' felement ')]",
"//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' felement ')] |" .
"//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" .
"//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-setting ')]",
$exception
);
}
Expand Down

0 comments on commit 4805a5b

Please sign in to comment.