HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/moodle/evaluaciones/moodle/course/tests/behat/course_search.feature
@core @core_course
Feature: Courses can be searched for and moved in bulk.
  In order to manage a large number of courses
  As a Moodle Administrator
  I need to be able to search courses in bulk and move them around

  Background:
    Given the following "categories" exist:
      | name | category | idnumber |
      | Science | 0 | SCI |
      | English | 0 | ENG |
      | Miscellaneous | 0 | MISC |
    And the following "courses" exist:
      | fullname | shortname | category |
      | Biology Y1 | BIO1 | MISC |
      | Biology Y2 | BIO2 | MISC |
      | English Y1 | ENG1 | ENG |
      | English Y2 | ENG2 | MISC |

  Scenario: Search courses finds correct results
    Given I log in as "admin"
    And I go to the courses management page
    When I set the field "coursesearchbox" to "Biology"
    And I press "Go"
    Then I should see "Biology Y1"
    And I should see "Biology Y2"
    And I should not see "English Y1"
    And I should not see "English Y2"

  @javascript
  Scenario: Search courses and move results in bulk
    Given I log in as "admin"
    And I go to the courses management page
    And I set the field "coursesearchbox" to "Biology"
    And I press "Go"
    When I select course "Biology Y1" in the management interface
    And I select course "Biology Y2" in the management interface
    And I set the field "menumovecoursesto" to "Science"
    And I press "Move"
    Then I should see "Successfully moved 2 courses into Science"
    And I wait to be redirected
    And I click on category "Science" in the management interface
    And I should see "Biology Y1"
    And I should see "Biology Y2"