Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_questionnaire
2
Feature: Rate scale questions have options for displaing "N/A"
3
  In order to display an "N/A"
4
  As a teacher
5
  I need to enter a rate question with correct options
6
 
7
  @javascript
8
  Scenario: Add a "N/A" option to an existing rate scale question
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
      | student1 | Student | 1 | student1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And the following "activities" exist:
21
      | activity | name | description | course | idnumber |
22
      | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 |
23
    And I log in as "teacher1"
24
    And I am on "Course 1" course homepage
25
    And I follow "Test questionnaire"
26
    And I navigate to "Questions" in current page administration
27
    And I add a "Rate (scale 1..5)" question and I fill the form with:
28
      | Question Name | Q1 |
29
      | Yes | y |
30
      | Question Text | Rate these movies from 1 to 5 |
31
      | Possible answers | Star Wars,Casablanca,Airplane |
32
    Then I should see "position 1"
33
    And I should see "[Rate (scale 1..5)] (Q1)"
34
    And I should see "Rate these movies from 1 to 5"
35
    And I log out
36
 
37
    And I log in as "student1"
38
    And I am on "Course 1" course homepage
39
    And I follow "Test questionnaire"
40
    And I navigate to "Answer the questions..." in current page administration
41
    Then I should see "Test questionnaire"
42
    And I should see "Rate these movies from 1 to 5"
43
    And I should not see "N/A"
44
    And I log out
45
 
46
    And I log in as "teacher1"
47
    And I am on "Course 1" course homepage
48
    And I follow "Test questionnaire"
49
    And I navigate to "Questions" in current page administration
50
    And I click on "input[title=Edit]" "css_element"
51
    And I should see "Editing Rate (scale 1..5) question"
52
    And I set the field "id_precise" to "1"
53
    And I press "Save changes"
54
    And I log out
55
 
56
    And I log in as "student1"
57
    And I am on "Course 1" course homepage
58
    And I follow "Test questionnaire"
59
    And I navigate to "Answer the questions..." in current page administration
60
    Then I should see "Test questionnaire"
61
    And I should see "Rate these movies from 1 to 5"
62
    And I should see "N/A"