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 single activity 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 a single activity format course
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 | format         | activitytype  |
14
      | Course 1 | C1        | singleactivity | quiz          |
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
  Scenario: Admin can see checkmark beside menu item they are currently on in a single activity format course
24
    Given I log in as "admin"
25
    And I am on "Course 1" course homepage
26
    When I navigate to "Backup" in current page administration
27
    Then menu item "Backup" should be active
28
    When I navigate to "Permissions" in current page administration
29
    Then menu item "Permissions" should be active
30
    And menu item "Backup" should not be active
31
 
32
    When I navigate to "Participants" in current page administration
33
    Then menu item "Participants" should be active
34
    And menu item "Backup" should not be active
35
    And menu item "Permissions" should not be active
36
    When I navigate to "Grades" in current page administration
37
    Then menu item "Grades" should be active
38
    And menu item "Backup" should not be active
39
    And menu item "Permissions" should not be active
40
    And menu item "Participants" should not be active
41
 
42
  Scenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button in a single
43
  activity format course
44
    Given I log in as "admin"
45
    And I am on "Course 1" course homepage
46
    When I navigate to "Backup" in current page administration
47
    Then menu item "Backup" should be active
48
    When I navigate to "Permissions" in current page administration
49
    Then menu item "Permissions" should be active
50
    And menu item "Backup" should not be active
51
    When I press the "back" button in the browser
52
    Then menu item "Backup" should be active
53
    And menu item "Permissions" should not be active
54
 
55
  Scenario: Admin can see checkmark beside menu item they are currently on after pressing browser back button when
56
  jumping between course and activity menu in a single activity format course
57
    Given I log in as "admin"
58
    And I am on "Course 1" course homepage
59
    When I navigate to "Backup" in current page administration
60
    Then menu item "Backup" should be active
61
    When I navigate to "Participants" in current page administration
62
    Then menu item "Participants" should be active
63
    And menu item "Backup" should not be active
64
    When I press the "back" button in the browser
65
    Then menu item "Backup" should be active
66
    And menu item "Participants" should not be active
67
 
68
  @javascript
69
  Scenario: Admin should not see checkmark if link is not navigated to in current browser for single activity format quiz
70
    Given I log in as "admin"
71
    And I am on "Course 1" course homepage
72
    And I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Participants')]" "xpath" link to "#"
73
    When I navigate to "Participants" in current page administration
74
    Then menu item "Participants" should not be active
75
    And I update the href of the "//*//a/following-sibling::*//a[contains(text(), 'Backup')]" "xpath" link to "#"
76
    When I click on "//*//a[contains(text(),'Activity')]" "xpath"
77
    And I click on "//*//a/following-sibling::*//a[contains(text(), 'Backup')]" "xpath"
78
    Then menu item "Backup" should not be active