Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_data
2
Feature: User can see the entry approval status on the single view and list view
3
  in the default template.
4
 
5
  Background:
6
    Given the following "users" exist:
7
      | username | firstname | lastname | email                |
8
      | teacher1 | Teacher   | 1        | teacher1@example.com |
9
      | student1 | Student   | 1        | student1@example.com |
10
    And the following "courses" exist:
11
      | fullname | shortname | category |
12
      | Course 1 | C1        | 0        |
13
    And the following "course enrolments" exist:
14
      | user     | course | role           |
15
      | teacher1 | C1     | editingteacher |
16
      | student1 | C1     | student        |
17
    And the following "activities" exist:
18
      | activity | name               | intro          | course | idnumber | approval |
19
      | data     | Test database name | Database intro | C1     | data1    | 1        |
20
    And the following "mod_data > fields" exist:
21
      | database | type | name   | description              |
22
      | data1    | text | field1 | Test field description   |
23
      | data1    | text | field2 | Test field 2 description |
24
    And the following "mod_data > templates" exist:
25
      | database | name            |
26
      | data1    | singletemplate  |
27
      | data1    | listtemplate    |
28
      | data1    | addtemplate     |
29
      | data1    | asearchtemplate |
30
      | data1    | rsstemplate     |
31
    And the following "mod_data > entries" exist:
32
      | database | user     | field1          | field2                 |
33
      | data1    | student1 | Student entry 1 | Some student content 1 |
34
      | data1    | teacher1 | Teacher entry 1 | Some teacher content 1 |
35
 
36
  @javascript
37
  Scenario Outline: The approval status is displayed in the single view and list view next to the action menu
38
    # List view.
39
    Given I am on the "Test database name" "data activity" page logged in as <user>
40
    Then I should see "Pending approval" in the "region-main" "region"
41
    # Single view.
42
    And I select "Single view" from the "jump" singleselect
43
    And I should see "Pending approval" in the "region-main" "region"
44
    And I click on "2" "link" in the ".pagination" "css_element"
45
    And I should not see "Pending approval" in the "region-main" "region"
46
    And I should not see "Approved" in the "region-main" "region"
47
    Examples:
48
      | user     |
49
      | student1 |
50
      | teacher1 |