Auto-tools/Projects/CrossWeave/Test Format/Form Data: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with '== Test Format == A FormData asset list is an array of objects, each with the following properties: * '''fieldname''': required. * '''value''': required. * '''date''': the time…')
 
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
* '''fieldname''': required.
* '''fieldname''': required.
* '''value''': required.
* '''value''': required.
* '''date''': the time the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago.  Optional, defaults to 0.
* '''date''': the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago.  Optional, defaults to 0.


For example:
For example:


  "formdata1": [
formdata1:
    { "fieldname": "testing", "value": "success", "date": -1 },
  * fieldname: testing
    { "fieldname": "testing", "value": "failure", "date": -2 },
    value: success
    { "fieldname": "username", "value": "joe" }
    date: -1
  ]
  * fieldname: testing
    value: failure
    date: -2
  * fieldname: username
    value: joe


== Actions ==
== Actions ==


FormData only supports all actions except '''modify'''.
FormData only supports all actions except '''modify'''.
== Example ==
For a more detailed, example, see the [http://hg.mozilla.org/automation/crossweave/file/af3dca0fb8ee/unittests/formdata.test CrossWeave formdata unit test].
== Notes ==


'''Note 1''', CrossWeave support the '''delete''' action for FormData, but Weave currently does not correctly sync deleted form data, see {{bug|568363}}.
'''Note 1''', CrossWeave support the '''delete''' action for FormData, but Weave currently does not correctly sync deleted form data, see {{bug|568363}}.
'''Note 2''', Weave currently does not sync FormData dates, so the '''date''' field is ignored when performing '''verify''' and '''verify-not''' actions.  See {{bug|552531}}.

Latest revision as of 18:14, 25 June 2010

Test Format

A FormData asset list is an array of objects, each with the following properties:

  • fieldname: required.
  • value: required.
  • date: the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago. Optional, defaults to 0.

For example:

formdata1:
  * fieldname: testing
    value: success
    date: -1
  * fieldname: testing
    value: failure
    date: -2
  * fieldname: username
    value: joe

Actions

FormData only supports all actions except modify.

Example

For a more detailed, example, see the CrossWeave formdata unit test.

Notes

Note 1, CrossWeave support the delete action for FormData, but Weave currently does not correctly sync deleted form data, see bug 568363.

Note 2, Weave currently does not sync FormData dates, so the date field is ignored when performing verify and verify-not actions. See bug 552531.