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

Issues with behat tests for HTML block

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Duplicate html to categoryhtml
      Move block_html.php to block_categoryhtml.php
      Move lang/en/block_html.php to lang/en/block_categoryhtml.php
      Rename block_categoryhtml.php class file from block_html to block_categoryhtml
      Rename version.php $plugin->component variable from block_html to block_categoryhtml
      Remove directory categoryhtml/tests

      Run behat tests with tags --tags="block_html"

      Show
      Duplicate html to categoryhtml Move block_html.php to block_categoryhtml.php Move lang/en/block_html.php to lang/en/block_categoryhtml.php Rename block_categoryhtml.php class file from block_html to block_categoryhtml Rename version.php $plugin->component variable from block_html to block_categoryhtml Remove directory categoryhtml/tests Run behat tests with tags --tags="block_html"
    • Workaround:
      Hide

      Rename your pluginname for your block to something called "HTML Category" or another name without HTML in it.

      Show
      Rename your pluginname for your block to something called "HTML Category" or another name without HTML in it.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      MDL-45320: Behat tests for HTML block has introduced related failures when you have a block called "categoryhtml" but not "myhtml".

      The tests fail to find the html block because it incorrect adds category html block.

      Block matching locator "'(new HTML block)'" not found.

      Behat runs:

      I set the field "bui_addblock" to "HTML"
      Then Moodle process_url_add() see the param as 'categoryhtml' not 'html'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rajeshtaneja Rajesh Taneja
                Reporter:
                tlock Tim Lock
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: