Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60540

MathJax loading info sits over buttons causing behat fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 3.4
    • Maths filters
    • MOODLE_34_STABLE
    • MDL-60540-master
    • Hide

      Modify the js_pending and js_complete functions in lib/javascript-static.js so they write a console message with the value of uniqid when they are called. 

      E.g.

      diff --git a/lib/javascript-static.js b/lib/javascript-static.js
      index 444aab5..39fd342 100644
      --- a/lib/javascript-static.js
      +++ b/lib/javascript-static.js
      @@ -662,6 +662,7 @@ M.util.complete_js = [];
      * @return boolean - True if there is any pending js.
      */
      M.util.js_pending = function(uniqid) {
      + console.log('Pending: ' + uniqid);
      if (uniqid !== false) {
      M.util.pending_js.push(uniqid);
      }
      @@ -698,6 +699,7 @@ YUI.add('moodle-core-io', function(Y) {
      */
      M.util.js_complete = function(uniqid) {
      // Use the Y.Array.indexOf instead of the native because some older browsers do not support
      + console.log('Complete: ' + uniqid);
      // the native function. Y.Array polyfills the native function if it does not exist.
      var index = Y.Array.indexOf(M.util.pending_js, uniqid);
      if (index >= 0) {
      

      Add a label to a course with some maths content. E.g.

      \( \pi \)

      Open the chrome debugger and change to the network tab. Check the box to disable the cache and choose the slow 3G network preset.

      View the course page with the maths content to be rendered. 

      You should see an early message in the console "Pending: filter_mathjaxloader". 

      You should not see a message "Complete: filter_mathjaxloader" UNTIL the maths content is actually rendered in the page. 

      View another page with no maths content.

      You should not see Either of the previous 2 console messages on this page.

      Show
      Modify the js_pending and js_complete functions in lib/javascript-static.js so they write a console message with the value of uniqid when they are called.  E.g. diff --git a/lib/javascript- static .js b/lib/javascript- static .js index 444aab5..39fd342 100644 --- a/lib/javascript- static .js +++ b/lib/javascript- static .js @@ - 662 , 6 + 662 , 7 @@ M.util.complete_js = []; * @return boolean - True if there is any pending js. */ M.util.js_pending = function(uniqid) { + console.log( 'Pending: ' + uniqid); if (uniqid !== false ) { M.util.pending_js.push(uniqid); } @@ - 698 , 6 + 699 , 7 @@ YUI.add( 'moodle-core-io' , function(Y) { */ M.util.js_complete = function(uniqid) { // Use the Y.Array.indexOf instead of the native because some older browsers do not support + console.log( 'Complete: ' + uniqid); // the native function. Y.Array polyfills the native function if it does not exist. var index = Y.Array.indexOf(M.util.pending_js, uniqid); if (index >= 0 ) { Add a label to a course with some maths content. E.g. \( \pi \) Open the chrome debugger and change to the network tab. Check the box to disable the cache and choose the slow 3G network preset. View the course page with the maths content to be rendered.  You should see an early message in the console "Pending: filter_mathjaxloader".  You should not see a message "Complete: filter_mathjaxloader" UNTIL the maths content is actually rendered in the page.  View another page with no maths content. You should not see Either of the previous 2 console messages on this page.

      It seems that we occasionally have a MathJax Loading info div sitting in the screen, over some buttons, which messes with Behat.

      See attached screenshot.

            damyon Damyon Wiese
            dobedobedoh Andrew Lyons
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.