Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

@core @core_question @qbank_filter @javascript
Feature: A teacher can pagimate through question bank questions
  In order to paginate questions
  As a teacher
  I must be able to paginate

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email |
      | teacher1 | Teacher | 1 | teacher1@example.com |
    And the following "courses" exist:
      | fullname | shortname | format |
      | Course 1 | C1 | weeks |
    And the following "course enrolments" exist:
      | user | course | role |
      | teacher1 | C1 | editingteacher |
    And the following "question categories" exist:
      | contextlevel | reference | questioncategory | name           |
      | Course       | C1        | Top              | Used category  |
    Given 100 "questions" exist with the following data:
      | questioncategory | Used category                 |
      | qtype            | essay                         |
      | name             | Tests question [count]        |
      | questiontext     | Write about whatever you want |
    And the following "questions" exist:
      | questioncategory | qtype | name                  | questiontext                  |
      | Used category    | essay | Not on first page     | Write about whatever you want |

  Scenario: Questions can be paginated
    When I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
    When I apply question bank filter "Category" with value "Course 1"
    And I follow "Sort by Question name ascending"
    And I follow "Sort by Question name descending"
    And I should see "Tests question 1"
    And I should not see "Not on first page"
    And I click on "2" "link" in the ".pagination" "css_element"
    And I should not see "Tests question 1"
    And I should see "Not on first page"