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

Random Behat failure in task logs report

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0
    • 4.0
    • Report builder

      The Behat test added for the system report in MDL-71153 has non-predictable ordering of the report during the test (because most/all of the tasks have identical timestart), leading to the following on our internal CI:

      ....F------.............................................
      --- Failed steps:
      001 Scenario: Filter task logs by name                                   # /builds/workplace/moodle_with_reportbuilder/admin/tests/behat/task_logs.feature:12
            And the following should exist in the "reportbuilder-table" table: # /builds/workplace/moodle_with_reportbuilder/admin/tests/behat/task_logs.feature:16
              (//html/.//table[(./@id = 'reportbuilder-table' or contains(.//caption, 'reportbuilder-table') or contains(.//th, 'reportbuilder-table') or contains(concat(' ', normalize-space(@class), ' '), 'reportbuilder-table' ))])[1]/tbody/tr[descendant::th[normalize-space(.)='Scheduled'] | descendant::td[normalize-space(.)='Scheduled']]/child::*[position() = count((//html/.//table[(./@id = 'reportbuilder-table' or contains(.//caption, 'reportbuilder-table') or contains(.//th, 'reportbuilder-table') or contains(concat(' ', normalize-space(@class), ' '), 'reportbuilder-table' ))])[1]/thead/tr[1]/th[(normalize-space(.)='Name' or a[normalize-space(text())='Name'] or div[normalize-space(text())='Name'])]/preceding-sibling::*) + 1][contains(normalize-space(.),'Synchronise self enrolments task')]
              
              Column value matching locator "Synchronise self enrolments task" in "Scheduled" row with column "Name" not found. (Behat\Mink\Exception\ElementNotFoundException)
      6 scenarios (5 passed, 1 failed)
      

      The failing assertion has no bearing on the test "Filter task logs by name"; convert to more appropriate assertions (scenario outline + examples)

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

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