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

Behat tests are not using grandparent contexts

XMLWordPrintable

      To reproduce:

      1. Create child theme of boost called boostchild
      2. Add behat override class for behat_blocks - behat_theme_boostchild_behat_blocks
      3. Create child theme of boostchild called boostgrandchild
      4. Initialise behat for all themes -

        php admin/tool/behat/cli/init.php --add-core-features-to-theme
        

      5. Run tests for blocks/tests/behat/manage_blocks.feature
      6. Error:

        `behat_blocks` context is not found in the suite environment. Have you registered it?
        

      On inspection of the behat.yml file, the parent contexts are included as expected. However when running tests, only the current suite is checked for overriding classes and not the parent.

      behat_theme_boostgrandchild_behat_blocks does not exist and behat_blocks is not in the list of contexts because it is overridden by behat_theme_boostchild_behat_blocks

        1. MDL-84448.png
          MDL-84448.png
          128 kB
        2. MDL-84448-asset.zip
          7 kB
        3. SLIN1-8847.diff
          1 kB

            amanda.doughty Amanda Doughty
            amanda.doughty Amanda Doughty
            Huong Nguyen Huong Nguyen
            Simey Lameze Simey Lameze
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 37 minutes
                4h 37m

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