Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@core @core_calendar
2
Feature: Confirm dates are human readable
3
  In order to ensure the calendar dates are human readable
4
  As an admin
5
  I need to create calendar events in near days
6
 
7
  Background:
8
    And the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1        | topics |
11
    And the following "blocks" exist:
12
      | blockname         | contextlevel | reference | pagetypepattern | defaultregion |
13
      | calendar_upcoming | System       | 1        | my-index   | content      |
14
 
15
  @javascript
16
  Scenario: Create human readable events
17
    Given I log in as "admin"
18
    And the following "events" exist:
19
      | name                             | eventtype | timestart                     | timeduration |
20
#      Starts today and ends today in the future
21
      | This day one hour event          | user      | ##today midnight +1 seconds## | 86398        |
22
#      Starts today, ends tomorrow
23
      | This day and 1 day event         | user      | ##today midnight +1 seconds## | 87000        |
24
#      Starts yesterday, ends today in the future
25
      | Last day one day event           | user      | ##today noon -1 days##        | 129598       |
26
#      Starts yesterday, ends in the past
27
      | Last day less than one day event | user      | ##today noon -1 days##        | 86400        |
28
#      Starts tomorrow
29
      | Next day event                   | user      | ##today midnight +1 days##    | 86400        |
30
#      Far in the future
31
      | Future event                     | user      | ##today noon +2 days##        | 86400        |
32
    When I am on homepage
33
    And I click on "This day one hour event" "link"
34
    Then I should see "Today" in the "This day one hour event" "dialogue"
35
    And I should not see "Yesterday" in the "This day one hour event" "dialogue"
36
    And I should not see "Tomorrow" in the "This day one hour event" "dialogue"
37
    And "Warning" "icon" should exist in the "This day one hour event" "dialogue"
38
    And I click on "Close" "button" in the "This day one hour event" "dialogue"
39
    And I click on "This day and 1 day event" "link"
40
    And I should see "Today" in the "This day and 1 day event" "dialogue"
41
    And I should not see "Yesterday" in the "This day and 1 day event" "dialogue"
42
    And I should see "Tomorrow" in the "This day and 1 day event" "dialogue"
43
    And "Warning" "icon" should exist in the "This day and 1 day event" "dialogue"
44
    And I click on "Close" "button" in the "This day and 1 day event" "dialogue"
45
    And I click on "Last day one day event" "link"
46
    And I should see "Today" in the "Last day one day event" "dialogue"
47
    And I should see "Yesterday" in the "Last day one day event" "dialogue"
48
    And I should not see "Tomorrow" in the "Last day one day event" "dialogue"
49
    And "Warning" "icon" should exist in the "Last day one day event" "dialogue"
50
    And I click on "Close" "button" in the "Last day one day event" "dialogue"
51
    And I click on "Next day event" "link"
52
    And I should not see "Today" in the "Next day event" "dialogue"
53
    And I should not see "Yesterday" in the "Next day event" "dialogue"
54
    And I should see "Tomorrow" in the "Next day event" "dialogue"
55
    And "Warning" "icon" should exist in the "Next day event" "dialogue"
56
    And I click on "Close" "button" in the "Next day event" "dialogue"
57
    And I click on "Future event" "link"
58
    And I should not see "Today" in the "Future event" "dialogue"
59
    And I should not see "Yesterday" in the "Future event" "dialogue"
60
    And I should not see "Tomorrow" in the "Future event" "dialogue"
61
    And "Warning" "icon" should not exist in the "Future event" "dialogue"
62
    And I click on "Close" "button" in the "Future event" "dialogue"