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

Blank spaces in activity names DOM breaking Behat selectors

    XMLWordPrintable

Details

    • 1
    • Team Hedgehog Sprint 1.3
    • Small

    Description

      Discovered while developing for MDL-75913.

      With a scenario in Behat where an activity has been added, it is difficult to select the item as you would expect with And I click on "ipsumFile" "link"

      Looking closely at the DOM, you will notice the activity name has an extra space added after its name. With exact matches of strings in Behat, this would require the clumsy use of "ipsumfile " (with a space).

      I believe this is just a formatting issue in course/format/templates/local/content/cm/title.mustache

      To replicate:

      1. Create an activity in a course
      2. Go back to the course page
      3. Use your code inspector and locate the activity hyperlink (nested somewhere in there)
      4. Notice the blank space after the activity name (.instancename)
      5. Depending on the activity you created, you may also notice a space before the activity type in another next span (.accesshide).

      Should be really easy to fix and make selecting these items in Behat tests reliable.

       

      Attachments

        Issue Links

          Activity

            People

              david.woloszyn@moodle.com David Woloszyn
              david.woloszyn@moodle.com David Woloszyn
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 45 minutes
                  45m