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

MathJax loading info sits over buttons causing behat fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: 3.4
    • Fix Version/s: None
    • Component/s: Maths filters
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60540-master

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: