Moodle
  1. Moodle
  2. MDL-25715

Useful new expectations for checking HTML output

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Unit tests
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15861

      Description

      I created these while writing Unit tests for the renderers for the new question engine. I think they are useful enough that they could be added to Moodle 2.0. Since they are just new test classes they should not break anything.

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          There are several parts to this:

          1. The fail messages from all the XMLStructureExpectations have been improved, in the case where the XML to be tested is not well-formed.

          2. New ContainsSelectExpectation for testing that output contains a drop-down menu.

          3. New DoesNotContainTagWithAttributes for testing that a certain tag with certain attributes anywhere.

          4. Unit tests for 2. and 3.

          Show
          Tim Hunt added a comment - There are several parts to this: 1. The fail messages from all the XMLStructureExpectations have been improved, in the case where the XML to be tested is not well-formed. 2. New ContainsSelectExpectation for testing that output contains a drop-down menu. 3. New DoesNotContainTagWithAttributes for testing that a certain tag with certain attributes anywhere. 4. Unit tests for 2. and 3.
          Hide
          Petr Škoda added a comment -

          closing, thanks!

          Show
          Petr Škoda added a comment - closing, thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: