mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-51311 javascript: Teach Behat to wait for pending JQuery ajax
This commit is contained in:
parent
e36d7d57ae
commit
1748938e15
2
lib/amd/build/first.min.js
vendored
2
lib/amd/build/first.min.js
vendored
@ -1 +1 @@
|
||||
define(function(){});
|
||||
define(["jquery"],function(a){a(document).bind("ajaxStart",function(){M.util.js_pending("jq")}).bind("ajaxStop",function(){M.util.js_complete("jq")})});
|
@ -18,10 +18,19 @@
|
||||
* Because every module is returned from a request for any other module, this
|
||||
* forces the loading of all modules with a single request.
|
||||
*
|
||||
* This function also sets up the listeners for ajax requests so we can tell
|
||||
* if any requests are still in progress.
|
||||
*
|
||||
* @module core/first
|
||||
* @package core
|
||||
* @copyright 2015 Damyon Wiese <damyon@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since 2.9
|
||||
*/
|
||||
define(function() { });
|
||||
define(['jquery'], function($) {
|
||||
$(document).bind("ajaxStart", function(){
|
||||
M.util.js_pending('jq');
|
||||
}).bind("ajaxStop", function(){
|
||||
M.util.js_complete('jq');
|
||||
});
|
||||
});
|
||||
|
@ -140,8 +140,6 @@ Feature: Users can edit tags to add description or rename
|
||||
And I click on "Edit tag name" "link" in the "Cat" "table_row"
|
||||
And I set the field "New name for tag Cat" to "Kitten"
|
||||
And I press key "13" in the field "New name for tag Cat"
|
||||
# TODO MDL-51311 : replace with "And I wait until the page is ready".
|
||||
And I wait "2" seconds
|
||||
Then I should not see "Cat"
|
||||
And "New name for tag" "field" should not be visible
|
||||
And I wait until "Kitten" "link" exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user