Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.4, 3.7.3, 3.8
-
Component/s: Automated functional tests (behat)
-
Testing Instructions:
- Install the attached plugin to the local folder
- Let the behat tests run with the tag @local_mdl60975
- See that both tests, one for the filepicker added by mform and one added by admin config pass
-
Affected Branches:MOODLE_34_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
Fixed Branches:MOODLE_37_STABLE, MOODLE_38_STABLE
-
Pull from Repository:
-
Pull 3.8 Branch:
MDL-60975-38 -
Pull 3.8 Diff URL:
-
Pull Master Branch:
MDL-60975-master -
Pull Master Diff URL:
Description
I believe the problem is in the behat_theme_boost_behat_repository_upload->get_filepicker_node().
Conditions for the test to fail:
- the filemanager needs to be on a settings.php
- using a theme based on boost, basically using the behat_theme_boost_behat_repository_upload->get_filepicker_node()
Basically the
//input[./@id = //label[normalize-space(.)=$filepickerelement]/@for]" .
|
"//ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' felement ')] |
xpath will find nothing because there is no "felement" class on the wrapper div when a filemanager is on a settings.php.
So reproduction steps are:
- in config.php set $CFG->theme = 'boost';
- in a .feature file:
@javascript
|
Scenario: configstoredfile test
|
When I log in as "admin" |
Then I navigate to "Appearance > Logos" in site administration |
And I upload "xyz test file" file to "Logo" filemanager |
This should end with:
"Logo" filepicker can not be found (Behat\Mink\Exception\ExpectationException) |
I think moodle currently does not have any test for file upload located on a settings.php (at least I did not find any), probably thats why nobody run into this. OR I seriously overlooked something, thats also a possibility, in that case please enlighten me.