Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4063

Using a method is ion-button parameters causes behat to fail in plugin tests in App version 4.0.0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • 4.0.0
    • None
    • Remote addons
    • MOODLE_400_STABLE

    Description

      We have a Moodle plugin that had been failing it's behat tests since version 4.0.0 of the app was released.

      The tests fail with a message like:

      When I press "AV test" in the app: Javascript code and/or AJAX requests are not ready after 40 seconds. There is a Javascript error or the code is extremely slow (DELAY:dom-mutation). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)
      

      I added in some additional console output in the Javascript the plugin was injecting into the app and think I see where the problem is.

      We have an ion-buttion that is added to a page via:

      <ion-button expand="full"
          core-site-plugins-call-ws name="mod_vote_vote"
          [params]="{id: <% id %>, type: <% type %>, vote: prep_data()}"
          [preSets]="{getFromCache: 0, saveToCache: 0}"
          (onSuccess) = "check_response($event)"
      >
          {{ 'plugin.mod_vote.submit' | translate }}
      </ion-button>
      

      The console output showed that in version 4.0.0 of the app prep_data() was being constantly called, in version 3.9.5 it was called much less frequently (and almost not at all it nothing was interacting with the app)

      Attachments

        Activity

          People

            jleyva Juan Leyva
            nmagill Neill Magill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: