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

Proper fix behat step when existing xpath used to interact with table elements.

XMLWordPrintable

      We have couple of hacks to make Behat pass in gradebook like this:

                      // Generate the content for a cell that represents a grade item.
                      // If a behat test site is running avoid outputting the information about the type of the grade item.
                      // This additional information causes issues in behat particularly with the existing xpath used to
                      // interact with table elements.
                      if (!defined('BEHAT_SITE_RUNNING')) {
                          $content = \html_writer::div($itemtype . $fullname);
                      } else {
                          $content = \html_writer::div($fullname);
                      }
      

      Three places so far:

      • grade/report/user/classes/report/user.php
      • grade/report/singleview/classes/local/screen/user.php
      • grade/edit/tree/lib.php

      When label is used Behat doesn't like it. There should be a proper fix for step definition instead of this work around

            pholden Paul Holden
            ilyatregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 34 minutes
                6h 34m

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