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

Behat: Delete activity step does not work with JS enabled

    XMLWordPrintable

    Details

      Description

      @Given /^I delete "(?P<activity_name_string>(?:[^"]|\\")*)" activity
      

      does not work with JS enabled

      @testtest
      Feature: Delete course module
        In order to manage my course's activities
        As a teacher
        I need to delete activities inside course sections
       
        Background:
          Given the following "users" exists:
            | username | firstname | lastname | email |
            | teacher1 | Teacher | 1 | teacher1@asd.com |
          And the following "courses" exists:
            | fullname | shortname |
            | Course 1 | C1 |
          And the following "course enrolments" exists:
            | user | course | role |
            | teacher1 | C1 | editingteacher |
          And I log in as "teacher1"
          And I follow "Course 1"
          And I press "Turn editing on"
          And I add a "Forum" to section "1" and I fill the form with:
            | Forum name | Test forum name 1 |
            | Description | Test forum description 1 |
          And I should see "Test forum name 1" in the "#region-main" "css_element"
          And I delete "Test forum name 1" activity
          And I should not see "Test forum name 1" in the "#region-main" "css_element"
        
       
        Scenario: Delete activity with JS disabled
        
        @javascript
        Scenario: Delete activity with JS enabled
      

      Result:

      Acceptance tests environment enabled on http://192.168.100.132/master, to run the tests use:
       vendor/bin/behat --config /home/marina/repositories/master/behatdata/behat/behat.yml
      Moodle 2.7dev (Build: 20140117), pgsql, 66e46b86c92d748aa07071a6e3f2cb0ac01c7858
      Server OS "Linux", Browser: "firefox"
      Started at 22-01-2014, 07:25
      ...............................F-
       
      (::) failed steps (::)
       
      01. Exception thrown by ((//html//li[contains(concat(' ', normalize-space(@class), ' '), ' activity ')][contains(., 'Test forum name 1')])[1]//a[./@href][(((./@id = 'Delete' or contains(normalize-space(string(.)), 'Delete')) or contains(./@title, 'Delete') or contains(./@rel, 'Delete')) or .//img[contains(./@alt, 'Delete')])]|(//html//li[contains(concat(' ', normalize-space(@class), ' '), ' activity ')][contains(., 'Test forum name 1')])[1]//*[./@role = 'link'][((./@id = 'Delete' or contains(./@value, 'Delete')) or contains(./@title, 'Delete') or contains(normalize-space(string(.)), 'Delete'))])[1]
          Element is not currently visible and so may not be interacted with
          Command duration or timeout: 7 milliseconds
          Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
          System info: host: 'marina-desktop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.11.0-12-generic', java.version: '1.7.0_51'
          Session ID: 03ba87b7-a4d0-41a3-b626-23b2764e356f
          Driver info: org.openqa.selenium.firefox.FirefoxDriver
          Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=26.0}]
          In step `And I delete "Test forum name 1" activity'. # behat_course::i_delete_activity()
          From scenario background.                            # /home/marina/repositories/master/moodle/blocks/recent_activity/tests/behat/delete_activity.feature:7
          Of feature `Delete course module'.                   # /home/marina/repositories/master/moodle/blocks/recent_activity/tests/behat/delete_activity.feature
       
      2 scenarios (1 passed, 1 failed)
      33 steps (31 passed, 1 skipped, 1 failed)
      0m39.654s
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14