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

Improve datasource test, remove reliance on actual report entity

XMLWordPrintable

      See this test: https://github.com/paulholden/moodle/blob/ebcc967d2e3a20229629e2712ab2cc521bbbd9ed/reportbuilder/tests/datasource_test.php#L272-L273

      The problem we have is that the test asserts specific number of report elements that the user entity contains (column, filters, conditions) - so once MDL-81602 is implemented (or right now in the case of Workplace: WP-4771) these tests are fragile because they cannot take account of/be aware of any additional elements added to the user entity

      Re-factor the test to not rely on other entities, and to only perform assertions on entities that are under control of the test

      Backport to stable branches as per usual improvements to test infra

            pholden Paul Holden
            pholden Paul Holden
            Carlos Castillo Carlos Castillo
            David Carrillo David Carrillo
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                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.