Proyectos de Subversion Moodle

Rev

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

Rev Autor Línea Nro. Línea
1 efrain 1
@qbank @qbank_usage
2
Feature: Use the qbank plugin manager page for question usage
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:
10
      | activity   | name      | course | idnumber |
11
      | quiz       | Test quiz | C1     | quiz1    |
12
    And the following "questions" exist:
1441 ariadna 13
      | questioncategory      | qtype     | name           | questiontext              |
14
      | Default for Test quiz | truefalse | First question | Answer the first question |
15
    And I change window size to "large"
1 efrain 16
 
17
  Scenario: Enable/disable question usage column from the base view
18
    Given I log in as "admin"
19
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
20
    And I should see "Question usage"
21
    When I click on "Disable" "link" in the "Question usage" "table_row"
22
    And I am on the "Test quiz" "mod_quiz > question bank" page
23
    Then I should not see "Usage"
24
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
25
    And I click on "Enable" "link" in the "Question usage" "table_row"
26
    And I am on the "Test quiz" "mod_quiz > question bank" page
27
    And I should see "Usage"
28
 
29
  @javascript
30
  Scenario: Question usage modal should work without any usage data
31
    And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
1441 ariadna 32
    And I should see "Default for Test quiz"
1 efrain 33
    And I should see "0" on the usage column
34
    When I click "0" on the usage column
35
    Then I should see "Version 1"
36
    And I should see "v1 (latest)" in the "Question 1" "question"
37
    And I click on "Close" "button" in the ".modal-dialog" "css_element"
38
    And I should see "0" on the usage column
39
 
40
  @javascript
41
  Scenario: Question usage modal should work with usage data
42
    Given quiz "Test quiz" contains the following questions:
43
      | question       | page |
44
      | First question | 1    |
45
    And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
1441 ariadna 46
    And I should see "Default for Test quiz"
1 efrain 47
    And I should see "1" on the usage column
48
    When I click "1" on the usage column
49
    Then "Test quiz" "table_row" should exist in the "question-usage_table" "region"