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

Behat edit section step fails on with section 0

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      CiBoT will tell us if all the @format tests, now using the fixed "I edit section X ..." steps .

      (so I've deleted the references to custom/wip .feature files here).

      Show
      CiBoT will tell us if all the @format tests, now using the fixed "I edit section X ..." steps . (so I've deleted the references to custom/wip .feature files here).
    • Workaround:
      Hide

      Do not create test items in the general section of a course.

      Show
      Do not create test items in the general section of a course.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The behat step 

       When I edit the section "0" and I fill the form with:

      fails on the topics format because it is looking for the string 'Edit topic', but for section 0 the string is 'Edit section'

      A similar thing happens for the Weekly course format.

      test.feature demonstrates the issue

      The fails with:

      D:\moodlesource\moodle32>vendor\bin\behat --tags="@wip" --config D:\moodledata\moodle32behat\behatrun\behat\behat.yml
      Moodle 3.2.2 (Build: 20170313)
      Php: 5.6.24, mysqli: 5.6.27-log, OS: Windows NT 6.1 i586
      Server OS "WINNT", Browser: "chrome"
      Browser specific fixes have been applied. See http://docs.moodle.org/dev/Acceptance_testing#Browser_specific_fixes
      Started at 29-03-2017, 21:36
      ......F.............F
       
      --- Failed steps:
       
      001 Scenario: Topics format edit section 0 # D:\moodlesource\moodle32\blocks\medschool_formulary\tests\b
      ehat\test.feature:7
      And I edit the section "0" and I fill the form with: # D:\moodlesource\moodle32\blocks\medschool_formulary\tests\b
      ehat\test.feature:21
      The "((//html/descendant-or-self::*[@id = 'section-0'])[1]//a
      [./@href][((./@id = 'Edit topic' or contains(normalize-space(string(.)), 'Edit topic') or contains(./@title, 'Ed
      it topic') or contains(./@rel, 'Edit topic')) or .//img[contains(./@alt, 'Edit topic')])]|(//html/descendant-or-self::*[
      @id = 'section-0'])[1]//*
      [translate(./@role, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = 'Edit topic'
      or contains(./@value, 'Edit topic')) or contains(./@title, 'Edit topic') or contains(normalize-space(string(.)), 'Edit
      topic'))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)
       
      002 Scenario: Weeks format edit section 0 # D:\moodlesource\moodle32\blocks\medschool_formulary\tests\b
      ehat\test.feature:41
      And I edit the section "0" and I fill the form with: # D:\moodlesource\moodle32\blocks\medschool_formulary\tests\b
      ehat\test.feature:55
      The "((//html/descendant-or-self::*[@id = 'section-0'])[1]//a
      [./@href][((./@id = 'Edit week' or contains(normalize-space(string(.)), 'Edit week') or contains(./@title, 'Edit
      week') or contains(./@rel, 'Edit week')) or .//img[contains(./@alt, 'Edit week')])]|(//html/descendant-or-self::*[@id =
      'section-0'])[1]//*
      [translate(./@role, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = 'Edit week'
      or contains(./@value, 'Edit week')) or contains(./@title, 'Edit week') or contains(normalize-space(string(.)), 'Edit wee
      k'))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)
       
      3 scenarios (1 passed, 2 failed)
      21 steps (19 passed, 2 failed)
      2m51.77s (49.14Mb)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Sep/17