Patch for "master" branch: https://reviews.mahara.org/6988
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
Status in Mahara:
We're seeing an annoying number of Behat tests that are failing due to
Here's an example: http://test.mahara.org/job/mahara-
In that case, the test is failing in this part:
1. I press "Create folder"
2. And I follow "Folder1"
The failure happens because Behat can't find a link named "Follow1"
when it tries to carry out that step. The way it *should* work, is
basically like this:
1. Behat step: I press "Create folder"
2. Behat web driver locates and presses the "Create folder" button.
Ajax request to submit the form for creating a new folder.
4. The Ajax request is handled by a PHP script, which creates the artefact
and sends back a success response, including updated HTML for what the file
area should look like now.
the new HTML in place of the old HTML. The new HTML contains the link to the
6. Behat step: I follow "Folder1"
7. Behat web driver locates and clicks the link with text "Folder1".
The race condition seems to happen because when you do the "I press"
step (defined in \Behat\MinkExtension\Context\MinkContext) waits for
the conclusion of any HTTP requests caused by the button press, but it
doesn't wait for the Pieform callback to finish.
The quick workaround for these is to add a "And I wait "1" seconds"
step on affected tests. But it would be better to get a systemic fix
to it. I think maybe the best thing to do, would be to change all the
underlying "find" methods into spin functions, which, if they don't
find the element, will wait up to 5 seconds to find it. Behat's
inheritance structure for steps may make that tricky to do, though.
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~mahara-contributors
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~mahara-contributors
More help : https://help.launchpad.net/ListHelp