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_history @javascript
1 efrain 2
Feature: Use the qbank plugin manager page for version column
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 "question categories" exist:
1441 ariadna 13
      | contextlevel    | reference | name           |
14
      | Activity module | quiz1    | Test questions |
1 efrain 15
    And the following "questions" exist:
1441 ariadna 16
      | questioncategory | qtype     | name             |
17
      | Test questions   | truefalse | First Question   |
18
    And the following "core_question > updated questions" exist:
19
      | questioncategory | question        | name            |
20
      | Test questions   | First Question  | First Edit      |
21
      | Test questions   | First Question  | Edit the Second |
22
      | Test questions   | First Question  | The Final Edit  |
1 efrain 23
 
24
  Scenario: Enable/disable version column from the base view
25
    Given I log in as "admin"
26
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
27
    And I should see "Question history"
28
    When I click on "Disable" "link" in the "Question history" "table_row"
29
    And I am on the "Test quiz" "mod_quiz > question bank" page
1441 ariadna 30
    And I apply question bank filter "Category" with value "Test questions"
1 efrain 31
    Then I should not see "Version" in the "region-main" "region"
32
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
33
    And I click on "Enable" "link" in the "Question history" "table_row"
34
    And I am on the "Test quiz" "mod_quiz > question bank" page
1441 ariadna 35
    And I apply question bank filter "Category" with value "Test questions"
1 efrain 36
    And I should see "Version" in the "region-main" "region"
1441 ariadna 37
 
38
  Scenario: Sort the question versions
39
    Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
40
    And I apply question bank filter "Category" with value "Test questions"
41
    When I choose "History" action for "The Final Edit" in the question bank
42
    Then "Edit the Second" "checkbox" should appear before "The Final Edit" "checkbox"
43
    And "First Edit" "checkbox" should appear before "Edit the Second" "checkbox"
44
    And "First Question" "checkbox" should appear before "First Edit" "checkbox"
45
    And I follow "Sort by Version descending"
46
    And "The Final Edit" "checkbox" should appear before "Edit the Second" "checkbox"
47
    And "Edit the Second" "checkbox" should appear before "First Edit" "checkbox"
48
    And "First Edit" "checkbox" should appear before "First Question" "checkbox"
49
    And I follow "Sort by Version ascending"
50
    And "Edit the Second" "checkbox" should appear before "The Final Edit" "checkbox"
51
    And "First Edit" "checkbox" should appear before "Edit the Second" "checkbox"
52
    And "First Question" "checkbox" should appear before "First Edit" "checkbox"