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

Wrong usage of hover step in Completion and other places.

XMLWordPrintable

      There are several "I hover" steps mis-used in order to check the state of Completion checking:

      mod/forum/tests/behat/completion_condition_number_discussions.feature:    Then I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_forum ')]/descendant::img[@alt='Not completed: Test forum name']" "xpath_element"
      mod/forum/tests/behat/completion_condition_number_discussions.feature:    And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_forum ')]/descendant::img[contains(@alt, 'Completed: Test forum name')]" "xpath_element"
      mod/lesson/tests/behat/completion_condition_end_reached.feature:    Then I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Not completed: Test lesson']" "xpath_element"
      mod/lesson/tests/behat/completion_condition_end_reached.feature:    And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Not completed: Test lesson']" "xpath_element"
      mod/lesson/tests/behat/completion_condition_end_reached.feature:    And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Completed: Test lesson']" "xpath_element"
      mod/lesson/tests/behat/completion_condition_time_spent.feature:    Then I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Not completed: Test lesson']" "xpath_element"
      mod/lesson/tests/behat/completion_condition_time_spent.feature:    And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Not completed: Test lesson']" "xpath_element"
      mod/lesson/tests/behat/completion_condition_time_spent.feature:    And I hover "//li[contains(concat(' ', normalize-space(@class), ' '), ' modtype_lesson ')]/descendant::img[@alt='Completed: Test lesson']" "xpath_element"
      

      From what I can tell, and dmonllao may be able to confirm, these steps are used to ascertain whether the specified xpath is present on the page. They're essentially being used instead of:

      "//...." "xpath_element" should exist
      

      Three things need to happen:

      1. These should be turned into a single step:

        the "My elaborate forum name" "forum" activity should (not) be marked as complete
        

      2. We should stop using I hover!!
      3. We should find all uses of this and determine whether we can remove the javascript tag

            rajeshtaneja Rajesh Taneja
            dobedobedoh Andrew Lyons
            John Okely John Okely
            David Monllaó David Monllaó
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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