Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_xmldb
2
Feature: Adding mandatory persistent fields to tables
3
  In order for me to be able to create database tables for a persistent class
4
  As a developer
5
  I need to be able to add fields that are mandatory for the persistent class that I am developing
6
 
7
  Background:
8
    Given I log in as "admin"
9
    And I navigate to "Development > XMLDB editor" in site administration
10
    And I click on "Load" "link" in the "admin/tool/cohortroles/db" "table_row"
11
    And I follow "admin/tool/cohortroles/db"
12
    And I follow "New table"
13
 
14
  Scenario: Cancel adding of mandatory persistent fields
15
    Given I follow "Add mandatory persistent fields"
16
    And I should see "usermodified"
17
    And I should see "timecreated"
18
    And I should see "timemodified"
19
    When I press "Cancel"
20
    Then I should see "Edit table"
21
    And I should not see "usermodified"
22
    And I should not see "timecreated"
23
    And I should not see "timemodified"
24
 
25
  Scenario: Creating mandatory persistent fields
26
    Given I follow "Add mandatory persistent fields"
27
    And I should see "usermodified"
28
    And I should see "timecreated"
29
    And I should see "timemodified"
30
    When I press "Continue"
31
    Then I should see "The following fields have been added:"
32
    And I should see "usermodified" in the ".alert ul" "css_element"
33
    And I should see "timecreated" in the ".alert ul" "css_element"
34
    And I should see "timemodified" in the ".alert ul" "css_element"
35
    And I follow "Back"
36
    And I should see "usermodified" in the "listfields" "table"
37
    And I should see "timecreated" in the "listfields" "table"
38
    And I should see "timemodified" in the "listfields" "table"
39
    And I should see "usermodified" in the "listkeys" "table"
40
 
41
  Scenario: Partial creation of mandatory persistent fields
42
    Given I follow "Add mandatory persistent fields"
43
    And I press "Continue"
44
    And I follow "Back"
45
    And I click on "Delete" "link" in the "timecreated" "table_row"
46
    And I press "Yes"
47
    When I follow "Add mandatory persistent fields"
48
    Then I should see "The following fields already exist:"
49
    And I should see "usermodified" in the ".alert ul" "css_element"
50
    And I should see "timemodified" in the ".alert ul" "css_element"
51
    But I should not see "timecreated" in the ".alert ul" "css_element"
52
    And I should see "Do you want to add the following fields:"
53
    And I should see "timecreated" in the ".modal ul" "css_element"
54
    And I press "Continue"
55
    And I should see "The following fields have been added:"
56
    And I should see "timecreated" in the ".alert ul" "css_element"
57
    And I should not see "timemodified" in the ".alert ul" "css_element"
58
    And I should not see "usermodified" in the ".alert ul" "css_element"
59
    And I follow "Back"
60
    And I should see "timecreated" in the "listfields" "table"
61
 
62
  Scenario: Trying to create mandatory persistent fields that have all been added
63
    Given I follow "Add mandatory persistent fields"
64
    And I press "Continue"
65
    And I follow "Back"
66
    When I follow "Add mandatory persistent fields"
67
    Then I should see "The following fields already exist:"
68
    And I should see "usermodified" in the ".alert ul" "css_element"
69
    And I should see "timecreated" in the ".alert ul" "css_element"
70
    And I should see "timemodified" in the ".alert ul" "css_element"
71
    And I should not see "Do you want to add the following fields:"