Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_activity_results
2
Feature: The activity results block doesn't displays student scores for unconfigured block
3
  In order to be display student scores
4
  As a user
5
  I need to see the activity results block
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1 | 0 |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And I log in as "teacher1"
18
    And I am on "Course 1" course homepage with editing mode on
19
 
20
  Scenario: Add the block to a the course with Javascript disabled
21
    Given I add the "Activity results" block
22
    Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block"
23
 
24
  @javascript
25
  Scenario: Add the block to a the course with Javascript enabled
26
    Given I add the "Activity results" block to the default region with:
27
      | config_showbest | 3 |
28
    Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block"
29
 
30
  Scenario: Try to configure the block on the course page in a course without activities
31
    Given I add the "Activity results" block
32
    When I configure the "Activity results" block
33
    And I should see "There are not yet any activities in this course."
34
    And I press "Save changes"
35
    Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block"
36
 
37
  Scenario: Try to configure the block on a resource page in a course without activities
38
    Given the following "activity" exists:
39
      | activity                      | page                  |
40
      | course                        | C1                    |
41
      | idnumber                      | 0001                  |
42
      | name                          | Test page name        |
43
      | intro                         | Test page description |
44
      | section                       | 1                     |
45
      | content                       | This is a page        |
46
    And I am on "Course 1" course homepage
47
    When I add the "Activity results" block
48
    And I configure the "Activity results" block
49
    And I should see "There are not yet any activities in this course."
50
    And I press "Save changes"
51
    Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block"