Posts made by Joseph Rézeau

Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Hi fellow developers!

I've started to create Behat tests for my new question type "Guessit" and have come across an interesting bug (or feature?).

I was basing my first add.feature on calculatedmulti\tests\behat\edit.feature which has this script:

And I press "Create a new question ..."
    And I set the field "Calculated multichoice" to "1"
    And I click on "Add" "button"

But, since I need to watch my script in my Firefox browser and love watching the Marionette do its tricks, I have added a @javascript param to my script. Unfortunately, this results in an error:

And I click on "Add" "button"                                                                # behat_general::i_click_on()
      Element <button class="btn btn-link text-reset" type="button"> is not clickable at point (418,428) because another element <div class="yui3-widget-mask moodle-dialogue-lightbox"> obscures it (Facebook\WebDriver\Exception\ElementClickInterceptedException)

So instead of using the And I click on "Add" "button" feature, I used this script:

And I add a "Guess It" question filling the form with:
      | Question name                     | guessit-001                    |
etc.

which seems to be favoured by most question types behat tests.

Maybe this problem should be mentioned in the Moodle development tools Behat tests section?

Average of ratings: -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Change of plans... I'll keep the questiontext field but use it for Description/Introduction for my questions.

And under it I'll add a "gaps" text field for entering the words to be guessed. At the moment I don't know how to save the contents of that field in my edit form. I'll keep trying.