Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@eWallah @availability @availability_relativedate @javascript
2
Feature: availability_relativedate ui none
3
  As an admin
4
  I cannot use relative modules if none is enabled
5
 
6
  Background:
7
    Given the following config values are set as admin:
8
      | enableavailability   | 1 |
9
    And the following "course" exists:
10
      | fullname          | Course 1             |
11
      | shortname         | C1                   |
12
      | category          | 0                    |
13
      | enablecompletion  | 1                    |
14
      | startdate         | ## -10 days 17:00 ## |
15
      | enddate           | ## +2 weeks 17:00 ## |
16
    And the following "activities" exist:
17
      | activity   | name   | intro | course | idnumber    | section | visible | completion |
18
      | page       | Page A | intro | C1     | pageA       | 1       | 1       | 0          |
19
      | page       | Page B | intro | C1     | pageB       | 1       | 1       | 0          |
20
    And the following "users" exist:
21
      | username |
22
      | teacher1 |
23
    And the following "course enrolments" exist:
24
      | user     | course | role           |
25
      | teacher1 | C1     | editingteacher |
26
 
27
  Scenario: Relative condition ui to a section when no completions
28
    When I log in as "teacher1"
29
    And I am on "Course 1" course homepage with editing mode on
30
    And I edit the section "1"
31
    And I expand all fieldsets
32
    And I press "Add restriction..."
33
    And I click on "Relative date" "button" in the "Add restriction..." "dialogue"
34
    Then I should see "after course start date"
35
    But I should not see "after completion of activity"
36
 
37
  Scenario: Relative condition ui with a module when no completions
38
    Given I am on the "pageB" "page activity editing" page logged in as teacher1
39
    And I expand all fieldsets
40
    And I click on "Add restriction..." "button"
41
    And I click on "Relative date" "button" in the "Add restriction..." "dialogue"
42
    Then I should see "after course start date"
43
    But I should not see "after completion of activity"