Affects Version/s: 2.7.2
Fix Version/s: None
Component/s: Automated functional tests (behat)
As a workaround, you can use the following, horribler Behat steps that do it individually (4 steps instead of one, but not the end of the world):As a workaround, you can use the following, horribler Behat steps that do it individually (4 steps instead of one, but not the end of the world): And I add a "File" to section "1" And I set the following fields to these values: | Name | FileResource | | Description | x | And I upload "/lib/tests/fixtures/empty.txt" file to "Select files" filemanager And I press "Save and return to course"
The Behat step to set form fields for a Resource including the file to upload is:
This works perfectly, when run in a single scenario. When you run another scenario previously, the step fails.
1. Download the attached issue_test.feature file.
2. Put this in the lib/tests/behat folder.
3. Run behat init.
4. Run behat with --tags=behatworks
Observe that the scenario completes successfully.
5. Run behat with --tags=behatbug
Observe that the same scenario now fails, just by virtue of having another scenario run previously (which does nothing).
(Tested on current master and 2.7.x.)