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

Better handling of action menus in some scenarios added by MDL-58974


      This is a followup of MDL-58974 where it was detected that some random failures were happening:

      --name 'Evaluate a model'
      Moodle 3.8dev (Build: 20190801), 414eca89239d275807f155837e10200f9e81322a
      Php: 7.3.7, pgsql: 9.6.14, OS: Darwin 18.7.0 x86_64
      Server OS "Darwin", Browser: "chrome"
      Browser specific fixes have been applied. See http://docs.moodle.org/dev/Acceptance_testing#Browser_specific_fixes
      Started at 02-08-2019, 05:56
      --- Pasos fallidos:
      001 Scenario: Evaluate a model                                         # /Users/stronk7/git_moodle/moodle/analytics/tests/behat/manage_models.feature:66
            And I click on "[title='View prediction details']" "css_element" # /Users/stronk7/git_moodle/moodle/analytics/tests/behat/manage_models.feature:116
              The "(//html/descendant-or-self::*[@title = 'View prediction details'])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)
      1 escenario (1 fallaron)
      68 pasos (50 pasaron, 1 fallaron, 17 saltadas)
      1m11.98s (86.01Mb)

      Performing this simple change to the special "action menu" steps seems to solve the problem:

      index 8a668c924fd..f6a22692e20 100644
      --- a/analytics/tests/behat/manage_models.feature
      +++ b/analytics/tests/behat/manage_models.feature
      @@ -112,8 +112,8 @@ Feature: Manage analytics models
           # View predictions
           When I select "C3" from the "contextid" singleselect
           #And I click on "#dropdown-3" "css_element"
      -    And I click on "Actions" "link" in the "Student 6" "table_row"
      -    And I click on "View prediction details" "link"
      +    And I open the action menu in "Student 6" "table_row"
      +    And I choose "View prediction details" in the open action menu
           And I should see "Prediction details"
           And I should see "Any write action"
           And I should see "Read actions amount"

      This issue is about to change as many of the uses to use the specialised steps in all the places where they can be used instead of the "click" variants.

      And, of course, ensure that the tests are passing consistently.

            vmdef Victor Déniz Falcón
            stronk7 Eloy Lafuente (stronk7)
            David Monllaó David Monllaó
            Adrian Greeve Adrian Greeve
            CiBoT CiBoT
            0 Vote for this issue
            3 Start watching this issue


                Original Estimate - 0 minutes
                Remaining Estimate - 0 minutes
                Time Spent - 3 hours, 45 minutes
                3h 45m

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