Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@core
2
Feature: Menu navigation has accurate checkmarks in topic course format
3
  In order to correctly navigate the menu items
4
  As an admin
5
  I need to see accurate checkmarks besides the menu items I am currently on while in topics format
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | T1        | Teacher1 | teacher1@example.com |
11
      | student1  | Student    | 1      | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1        | 0        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1  | C1      | student         |
19
    And the following "activities" exist:
20
      | activity   | name   | intro                           | course | idnumber |
21
      | quiz       | Quiz 1 | Quiz 1 for testing the Add menu | C1     | quiz1    |
22
 
23
  @javascript
24
  Scenario: Admin can see checkmark beside menu item they are currently on in the quiz page of a topics format course
25
    Given I log in as "admin"
26
    And I am on "Course 1" course homepage
27
    And I follow "Quiz 1"
28
    When I navigate to "Filters" in current page administration
29
    Then menu item "Filters" should be active
30
    When I navigate to "Permissions" in current page administration
31
    Then menu item "Permissions" should be active
32
    And menu item "Filters" should not be active
33
    When I navigate to "Backup" in current page administration
34
    Then menu item "Backup" should be active
35
    And menu item "Filters" should not be active
36
    And menu item "Permissions" should not be active
37
 
38
  @javascript
39
  Scenario: Admin can see checkmark beside menu item they are currently on in the course page of a topics format course
40
    Given I log in as "admin"
41
    And I am on "Course 1" course homepage
42
    When I navigate to "Filters" in current page administration
43
    Then menu item "Filters" should be active
44
    When I navigate to "Course reuse" in current page administration
45
    Then menu item "Course reuse" should be active
46
    And menu item "Filters" should not be active
47
 
48
  @javascript
49
  Scenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button in the
50
  quiz page of a topics format course
51
    Given I log in as "admin"
52
    And I am on "Course 1" course homepage
53
    And I follow "Quiz 1"
54
    When I navigate to "Filters" in current page administration
55
    Then menu item "Filters" should be active
56
    When I navigate to "Permissions" in current page administration
57
    Then menu item "Permissions" should be active
58
    And menu item "Filters" should not be active
59
    When I press the "back" button in the browser
60
    Then menu item "Filters" should be active
61
    And menu item "Permissions" should not be active
62
 
63
  @javascript
64
  Scenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button in the
65
  course page of a topics format course
66
    Given I log in as "admin"
67
    And I am on "Course 1" course homepage
68
    When I navigate to "Filters" in current page administration
69
    Then menu item "Filters" should be active
70
    When I navigate to "Course reuse" in current page administration
71
    Then menu item "Course reuse" should be active
72
    And menu item "Filters" should not be active
73
    When I press the "back" button in the browser
74
    Then menu item "Filters" should be active
75
    And menu item "Course reuse" should not be active
76
 
77
  @javascript
78
  Scenario: Admin should not see checkmark if link is not navigated to in current browser in course view for topics format
79
    Given I log in as "admin"
80
    And I am on "Course 1" course homepage
81
    And I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Filters')]" "xpath" link to "#"
82
    And I navigate to "Question banks" in current page administration
83
    Then menu item "Filters" should not be active
84
 
85
  @javascript
86
  Scenario: Admin should not see checkmark if link is not navigated to in current browser in quiz view for topics format
87
    Given I log in as "admin"
88
    And I am on "Course 1" course homepage
89
    And I follow "Quiz 1"
90
    And I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Backup')]" "xpath" link to "#"
91
    And I navigate to "Backup" in current page administration
92
    Then menu item "Backup" should not be active