Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given the following "courses" exist:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
9
      | fullname | shortname | format |
-
 
10
      | Course 1 | C1        | topics |
-
 
11
    And the following "users" exist:
-
 
12
      | username | firstname | lastname | email                |
-
 
13
      | student1 | Student   | 1        | student1@example.com |
-
 
14
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
15
    And the following "course enrolments" exist:
-
 
16
      | user     | course | role           |
-
 
17
      | student1 | C1     | student        |
10
      | Course 1 | C1        | topics |
18
      | teacher1 | C1     | editingteacher |
Línea 11... Línea 19...
11
    And I am on the "C1" "course" page logged in as "admin"
19
    And I am on the "C1" "course" page logged in as "admin"
12
 
20
 
13
  Scenario: The glossary random block can be added when glossary module is enabled
21
  Scenario: The glossary random block can be added when glossary module is enabled
14
    Given I turn editing mode on
22
    Given I turn editing mode on
Línea 15... Línea 23...
15
    When I click on "Add a block" "link"
23
    When I click on "Add a block" "link"
16
    Then I should see "Random glossary entry"
24
    Then I should see "Random glossary entry"
17
 
25
 
18
  Scenario: The glossary random block cannot be added when glossary module is disabled
26
  Scenario: The glossary random block cannot be added when glossary module is disabled
19
    Given I navigate to "Plugins > Activity modules > Manage activities" in site administration
27
    Given I navigate to "Plugins > Activity modules > Manage activities" in site administration
20
    And I click on "Disable Glossary" "icon" in the "Glossary" "table_row"
28
    And I toggle the "Disable Glossary" admin switch "off"
-
 
29
    And I am on "Course 1" course homepage with editing mode on
-
 
30
    When I click on "Add a block" "link"
-
 
31
    Then I should not see "Random glossary entry"
-
 
32
 
-
 
33
  Scenario: View alphabetical order multilang entries in the glossary block
-
 
34
    Given the following "activities" exist:
-
 
35
      | activity | name    | intro              | course | idnumber  | defaultapproval |
-
 
36
      | glossary | Animals | An animal glossary | C1     | glossary3 | 1               |
-
 
37
    And the following "mod_glossary > entries" exist:
-
 
38
      | glossary | user     | concept   | definition                                                                                          |
-
 
39
      | Animals  | student1 | Aardvark  | <span lang="en" class="multilang">Aardvark</span><span lang="de" class="multilang">Erdferkel</span> |
-
 
40
      | Animals  | student1 | Kangaroo  | <span lang="en" class="multilang">Kangaroo</span><span lang="de" class="multilang">Känguru</span>   |
-
 
41
      | Animals  | student1 | Zebra     | <span lang="en" class="multilang">Zebra</span><span lang="de" class="multilang">Zebra</span>        |
-
 
42
    And the "multilang" filter is "on"
-
 
43
    And the "multilang" filter applies to "content and headings"
-
 
44
    And I log out
-
 
45
    And I log in as "teacher1"
-
 
46
    And I am on "C1" course homepage with editing mode on
-
 
47
    And I add the "Random glossary entry..." block
-
 
48
    And I set the following fields to these values:
-
 
49
      | Title                             | ManualGlossaryblock |
-
 
50
      | Take entries from this glossary   | Animals             |
-
 
51
      | Days before a new entry is chosen | 0                   |
-
 
52
      | How a new entry is chosen         | Alphabetical order  |
-
 
53
    And I press "Save changes"
-
 
54
    And I should see "Aardvark" in the "ManualGlossaryblock" "block"
-
 
55
    And I should not see "AardvarkErdferkel" in the "ManualGlossaryblock" "block"
-
 
56
    And I reload the page
-
 
57
    And I should see "Kangaroo" in the "ManualGlossaryblock" "block"