Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @javascript @core_form
2
Feature: Any day / month / year combination in date form elements works ok.
3
  In order to use date / datetime elements with Behat
4
  as a user
5
  Any day / month / year combination must work ok
6
 
7
  @javascript
8
  Scenario Outline: Verify that setting any date / datetime is possible with enabled fields
9
    Given the following "courses" exist:
10
      | fullname | shortname | format |
11
      | Course 1 | C1        | topics |
12
    And the following "activity" exist:
13
      | activity   | name          | intro                              | course | idnumber |
14
      | assign     | Assignment 01 | Assign activity to test some dates | C1     | assign01 |
15
    And I am on the "Assignment 01" "assign activity editing" page logged in as admin
16
    And I expand all fieldsets
17
    And I set the field "Due date" to "<initial_date>"
18
    And I set the field "Due date" to "<final_date>"
19
    When I press "Save and display"
20
    Then the activity date in "Assignment 01" should contain "Due:"
21
    And the activity date in "Assignment 01" should contain "<date_result>"
22
 
23
    Examples:
24
      | initial_date | final_date        | date_result                            | case_explanation (times Australia/Perth)   |
25
      | ##today##    | ##tomorrow noon## | ##tomorrow noon##%A, %d %B %Y, %I:%M## | change of day, any day, back and forth     |
26
      | ##tomorrow## | ##today noon##    | ##today noon##%A, %d %B %Y, %I:%M##    |                                            |
27
      | 1617256800   | 1617170400        | Wednesday, 31 March 2021, 2:00         | change of month, back and forth            |
28
      | 1617170400   | 1617256800        | Thursday, 1 April 2021, 2:00           |                                            |
29
      | 1740808800   | 1709186400        | Thursday, 29 February 2024, 2:00       | change of month, leap year, back and forth |
30
      | 1709186400   | 1740808800        | Saturday, 1 March 2025, 2:00           |                                            |
31
      | 1577858400   | 1577772000        | Tuesday, 31 December 2019, 2:00        | change of year, back and forth             |
32
      | 1577772000   | 1577858400        | Wednesday, 1 January 2020, 2:00        |                                            |
33
 
34
  @javascript
35
  Scenario Outline: Verify that setting any date / datetime is possible with disabled fields
36
    Given the following "courses" exist:
37
      | fullname | shortname | format |
38
      | Course 1 | C1        | topics |
39
    And the following "activity" exist:
40
      | activity   | name          | intro                              | course | idnumber |
41
      | assign     | Assignment 01 | Assign activity to test some dates | C1     | assign01 |
42
    And I am on the "Assignment 01" "assign activity editing" page logged in as admin
43
    And I expand all fieldsets
44
    And I set the field "Due date" to "<initial_date>"
45
    And I set the field "Due date" to "disabled"
46
    And I set the field "Due date" to "<final_date>"
47
    When I press "Save and display"
48
    Then the activity date in "Assignment 01" should contain "Due:"
49
    And the activity date in "Assignment 01" should contain "<date_result>"
50
 
51
    Examples:
52
      | initial_date | final_date        | date_result                            | case_explanation (times Australia/Perth)   |
53
      | ##today##    | ##tomorrow noon## | ##tomorrow noon##%A, %d %B %Y, %I:%M## | change of day, any day, back and forth     |
54
      | ##tomorrow## | ##today noon##    | ##today noon##%A, %d %B %Y, %I:%M##    |                                            |
55
      | 1617256800   | 1617170400        | Wednesday, 31 March 2021, 2:00         | change of month, back and forth            |
56
      | 1617170400   | 1617256800        | Thursday, 1 April 2021, 2:00           |                                            |
57
      | 1740808800   | 1709186400        | Thursday, 29 February 2024, 2:00       | change of month, leap year, back and forth |
58
      | 1709186400   | 1740808800        | Saturday, 1 March 2025, 2:00           |                                            |
59
      | 1577858400   | 1577772000        | Tuesday, 31 December 2019, 2:00        | change of year, back and forth             |
60
      | 1577772000   | 1577858400        | Wednesday, 1 January 2020, 2:00        |                                            |