aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_dataforms_spec.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.dataforms: Coerce number values for boolean fieldsKim Alvefur2021-10-261-0/+10
| | | | | Makes more sense than coercing to a string, which would always be truthy.
* util.dataforms: Add support for datetime field types via XEP-0122Kim Alvefur2021-10-251-0/+14
|
* util.dataforms: Add support for validating (integer) rangesKim Alvefur2019-11-211-0/+9
|
* util.dataforms: Add more XEP-0211 media element test coverageKim Alvefur2020-08-161-0/+28
|
* util.dataforms: Convert media element sizes to avoid error on Lua 5.3Kim Alvefur2020-08-161-0/+15
| | | | | | | | The stanza API does not accept number values and threw an error due to the height and width attributes of the media element (XEP-0221). This part had no test coverage previously, explaining why it was not discovered until now.
* util.dataforms: Improve descriptions in testsKim Alvefur2019-12-161-5/+5
|
* util.dataforms: Add support for XEP-0122: Data Forms ValidationKim Alvefur2018-09-011-0/+22
| | | | Initially only basic validation of xs:integer
* util.dataforms: Allow field names to be different from the 'var' attributeKim Alvefur2018-09-011-0/+15
| | | | | | This should allow the usage of long prefixes and namespace-like names to be contained to the XML representation of the form, so that the code can use more convenient names.
* util.dataforms: Allow passing the current values to be used in stead of ↵Kim Alvefur2018-08-051-0/+39
| | | | omitted fields
* util.dataforms: Add failing test for #1177Kim Alvefur2018-06-301-0/+27
|
* util.dataforms: Include a fixed field in testKim Alvefur2018-07-151-0/+10
|
* util.dataforms: Add a simple function for identifying form typesKim Alvefur2018-06-021-0/+9
| | | | | This is meant to allow identifying forms without parsing them completely.
* util.dataforms: Add initial testsKim Alvefur2018-06-021-0/+305
This covers basic form generation, that the fields have the correct attributes, children and text content.