Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_customcert
2
Feature: Being able to set the required minutes in a course before viewing the certificate
3
  In order to ensure the required minutes in a course setting works as expected
4
  As a teacher
5
  I need to ensure students can not view a certificate until the required minutes have passed
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1        | 0        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com |
14
      | student1 | Student   | 1        | student1@example.com |
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    | requiredtime |
21
      | customcert | Custom certificate 1 | Custom certificate 1 intro | C1     | customcert1 | 1            |
22
 
23
  Scenario: Check the user can not access the certificate before the required time
24
    And I log in as "student1"
25
    And I am on "Course 1" course homepage
26
    And I follow "Custom certificate 1"
27
    And I should see "You must spend at least a minimum of"
28
    And I should not see "View certificate"
29
    And I press "Continue"
30
    And I should see "Custom certificate 1"
31
 
32
  Scenario: Check the user can access the certificate after the required time
33
    And I log in as "student1"
34
    And I am on "Course 1" course homepage
35
    And I wait "60" seconds
36
    And I am on "Course 1" course homepage
37
    And I follow "Custom certificate 1"
38
    And I should not see "You must spend at least a minimum of"
39
    And I should see "View certificate"