Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@qbank @qbank_managecategories @view_manage_categories_plugin @javascript
1 efrain 2
Feature: Use the qbank plugin manager page for managecategories
3
  In order to check the plugin behaviour with enable and disable
4
 
5
  Background:
6
    Given the following "courses" exist:
7
      | fullname | shortname | category |
8
      | Course 1 | C1        | 0        |
9
    And the following "activities" exist:
1441 ariadna 10
      | activity | name      | course | idnumber |
11
      | quiz     | Test quiz | C1     | quiz1    |
1 efrain 12
    And the following "question categories" exist:
1441 ariadna 13
      | contextlevel    | reference | name           |
14
      | Activity module | quiz1     | Test questions |
1 efrain 15
    And the following "questions" exist:
16
      | questioncategory | qtype     | name           | questiontext              |
17
      | Test questions   | truefalse | First question | Answer the first question |
18
 
19
  Scenario: Enable/disable managecategories plugin from the base view
20
    Given I log in as "admin"
21
    When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
22
    And I should see "Manage categories"
23
    And I click on "Disable" "link" in the "Manage categories" "table_row"
24
    And I am on the "Test quiz" "quiz activity" page
25
    Then "Categories" "link" should not exist in current page administration
26
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
27
    And I click on "Enable" "link" in the "Manage categories" "table_row"
28
    And I am on the "Test quiz" "mod_quiz > question bank" page
1441 ariadna 29
    And I should see "Categories" in the "Question bank tertiary navigation" "select"
1 efrain 30
 
31
  Scenario: Enable/disable the tab New category when trying to add a random question to a quiz
32
    Given I log in as "admin"
33
    When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
34
    And I should see "Manage categories"
35
    And I click on "Disable" "link" in the "Manage categories" "table_row"
36
    And I am on the "Test quiz" "quiz activity" page
37
    And I click on "Add question" "link"
38
    And I open the "last" add to quiz menu
39
    And I follow "a random question"
40
    Then I should not see "New category"
41
    And I click on "cancel" "button"
42
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
43
    And I click on "Enable" "link" in the "Manage categories" "table_row"
44
    And I am on the "Test quiz" "quiz activity" page
45
    And I click on "Add question" "link"
46
    And I open the "last" add to quiz menu
47
    And I follow "a random question"
48
    And I should see "New category"