Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @gradereport_user @javascript
2
Feature: Teacher can navigate to the previous or next user report.
3
  In order to get go the previous or next user report
4
  As a teacher
5
  I need to click on the previous/next navigation links
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course   | C1        | 0        |
11
    And the following "users" exist:
12
      | username  | firstname | lastname  | email                 | idnumber  |
13
      | teacher1  | Teacher   | 1         | teacher1@example.com  | t1        |
14
      | student1  | Student   | 1         | student1@example.com  | s1        |
15
      | student2  | Student   | 2         | student2@example.com  | s2        |
16
      | student3  | Student   | 3         | student3@example.com  | s3        |
17
    And the following "course enrolments" exist:
18
      | user      | course | role           |
19
      | teacher1  | C1     | editingteacher |
20
      | student1  | C1     | student        |
21
      | student2  | C1     | student        |
22
      | student3  | C1     | student        |
23
    And the following "activities" exist:
24
      | activity | course | idnumber | name                | grade |
25
      | assign   | C1     | a1       | Test assignment one | 300   |
26
    And I am on the "Course" "grades > User report > View" page logged in as "teacher1"
27
 
28
  Scenario: A teacher can navigate to the next user report
29
    Given I click on "Student 1" in the "user" search widget
30
    And "Student 1" "heading" should exist
31
    And ".previous" "css_element" should not exist in the ".user-navigation" "css_element"
32
    And ".next" "css_element" should exist in the ".user-navigation" "css_element"
33
    And I should see "Student 2" in the ".next" "css_element"
34
    When I click on "Student 2" "link" in the ".next" "css_element"
35
    And "Student 2" "heading" should exist
36
    And ".previous" "css_element" should exist in the ".user-navigation" "css_element"
37
    And I should see "Student 1" in the ".previous" "css_element"
38
    And ".next" "css_element" should exist in the ".user-navigation" "css_element"
39
    And I should see "Student 3" in the ".next" "css_element"
40
    And I click on "Student 3" "link" in the ".next" "css_element"
41
    And "Student 3" "heading" should exist
42
    And ".previous" "css_element" should exist in the ".user-navigation" "css_element"
43
    And I should see "Student 2" in the ".previous" "css_element"
44
    And ".next" "css_element" should not exist in the ".user-navigation" "css_element"
45
 
46
  Scenario: A teacher can navigate to the previous user report
47
    Given I click on "Student 3" in the "user" search widget
48
    And "Student 3" "heading" should exist
49
    And ".previous" "css_element" should exist in the ".user-navigation" "css_element"
50
    And I should see "Student 2" in the ".previous" "css_element"
51
    And ".next" "css_element" should not exist in the ".user-navigation" "css_element"
52
    When I click on "Student 2" "link" in the ".previous" "css_element"
53
    And "Student 2" "heading" should exist
54
    And ".previous" "css_element" should exist in the ".user-navigation" "css_element"
55
    And I should see "Student 1" in the ".previous" "css_element"
56
    And ".next" "css_element" should exist in the ".user-navigation" "css_element"
57
    And I should see "Student 3" in the ".next" "css_element"
58
    And I click on "Student 1" "link" in the ".previous" "css_element"
59
    And "Student 1" "heading" should exist
60
    And ".previous" "css_element" should not exist in the ".user-navigation" "css_element"
61
    And ".next" "css_element" should exist in the ".user-navigation" "css_element"
62
    And I should see "Student 2" in the ".next" "css_element"