Hello,
I have some problem writting a Behat test for tracker issue MDL-32870
You can see the actual state of my test here.
Background: This issue is about adding filepicker for answers and response fields in questions in the lesson activity.
To test this feature, as a teacher I create a lesson with 2 question page, a multichoice one and a true/false one with a small image, in one of the answer for the first one and in one of the response for the second (lesson "responses" are similar to quiz feedbacks).
I have 2 problems
The first one is that the image is not inserted in the right editor: it is inserted in the "Content" editor and not in one of the "Answer" editors
So obviously my
And I select the text in the "Answer" Atto editor
and
And I select the text in the "Response" Atto editor
steps are wrong which is quite understandable as there are several editors with that label on the page !
I tried to use the editor id for instance
And I select the text in the "id_answer_editor_2" Atto editor but it doesn't work.
The second problem is how I verify that everything is OK when I attempt the lesson as a student, so how I verify there is an image with name moodle_logo.jpg on screen and it is not broken ?
Thanks for any help.
For a "little developer" (in fact I don't claim to be a developer, I am a math teacher ) it become harder and harder to contribute to Moodle and with all the new tools introduced in a short time (phpunit, shifter, Behat, selenium, ...) I am fearing the Moodle Community will loose one of it's beauty: the number of people contributing to the project. Unfortunately the recent decrease in the number of contributors seems to support this fear.
Obviously the solution is not to stop bringing Moodle development to a higher level, each of the above mentioned tool is a step forward (and for instance once you get Behat working it's quite fun and rewarding to look at the tests when they are running). IMHO the solution is for Moodle HQ to better support little developers like me.
For instance I had a lot of trouble getting Behat to work on my windows computer, and the docs weren't really helpful (I know docs are a wiki so I should contribute to make them better but for a teacher like me time is a big constraint and all time I will spend on Moodle docs will be time not spend on trying to contribute to Moodle fixing bugs and developing new plugins).
A Behat cookbook would be very helpful too (How do I ... in my scenarios ?) maybe there is one but I was not able to find it.
To finish on a positive note on a completely different subject, some weeks ago I was rather angry about the work needed to modify my plugins for the new logging and event stuff introduced in Moodle 2.7. I was even doubtful it will be of any use to plugins author. Then I discovered Frederic's beautiful block_xp (Alias Level Up!) plugin and this reconciliate me with the events stuff. Well done Fred (and Moodle HQ) it's little gems like this that makes Moodle so wonderful.