Commit 3bf365c0 authored by Rafael Monnerat's avatar Rafael Monnerat

Partial re-implementation of the Parameter editor

See merge request !438
parents d058b2a9 7e6313f5
Pipeline #24494 failed with stage
in 0 seconds
......@@ -188,10 +188,11 @@ url_list = [
"gadget_slapos_utils.js",
"leaflet.css",
"leaflet.js",
"tv4.min.js",
"vkbeautify.js",
"jquery.js",
"URI.js",
"ref-parser.min.js",
"cfworker-jsonschema-validator.js",
"slapos_load_software_schema.json",
"slapos_load_meta_schema_xml.json",
"slapos_load_meta_schema_json_in_xml.json",
......
......@@ -39,7 +39,7 @@ class TestSlapOSXHTML(SlapOSTestCaseMixin, testXHTML.TestXHTML):
'erp5_corporate_identity',
'erp5_corporate_identity_web',
'erp5_notebook', 'erp5_officejs_notebook',
'erp5_web_js_style_ui')
'erp5_web_js_style_ui', 'slapos_hal_json_style')
def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self)
# Live tests all uses the same request. For now we remove cell from
......
......@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSXHTML</string> </value>
......@@ -55,28 +49,13 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -89,7 +68,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
......
......@@ -11,7 +11,8 @@
<script src="URI.js" type="text/javascript"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="tv4.min.js" type="text/javascript"></script>
<script src="ref-parser.min.js" type="text/javascript"></script>
<script src="cfworker-jsonschema-validator.js" type="text/javascript"></script>
<script src="URI.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_load_schema.js" type="text/javascript"></script>
......@@ -19,4 +20,4 @@
<body>
<div />
</body>
</html>
\ No newline at end of file
</html>
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.37330.56513.53265</string> </value>
<value> <string>1003.47746.47713.61474</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1650027159.97</float>
<float>1666203779.53</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS, console, RSVP, jQuery, jIO, tv4, URI, JSON, $, btoa */
(function (window, rJS, $, RSVP, btoa, URI, tv4) {
/*global window, rJS, RSVP, btoa, URI, Validator, jIO, JSON, $RefParser */
(function (window, rJS, RSVP, btoa, URI, Validator, jIO, JSON, $RefParser) {
"use strict";
var gk = rJS(window);
function getJSON(url) {
var uri = URI(url),
headers = {},
......@@ -31,196 +29,7 @@
});
}
function resolveLocalReference(ref, schema) {
// 2 here is for #/
var i, ref_path = ref.substr(2, ref.length),
parts = ref_path.split("/");
if (parts.length === 1 && parts[0] === "") {
// It was uses #/ to reference the entire json so just return it.
return schema;
}
for (i = 0; i < parts.length; i += 1) {
schema = schema[parts[i]];
}
return schema;
}
function resolveReference(partial_schema, schema, base_url) {
var parts,
external_schema,
ref = partial_schema.$ref;
if (ref === undefined) {
return new RSVP.Queue().push(function () {
return partial_schema;
});
}
if (ref.substr(0, 1) === "#") {
return new RSVP.Queue().push(function () {
return resolveLocalReference(ref, schema);
});
}
return new RSVP.Queue().push(function () {
if (URI(ref).protocol() === "") {
if (base_url !== undefined) {
ref = base_url + "/" + ref;
}
}
return getJSON(ref);
})
.push(function (json) {
external_schema = JSON.parse(json);
parts = ref.split("#");
ref = "#" + parts[1];
return resolveLocalReference(ref, external_schema);
});
}
function clone(obj) {
return JSON.parse(JSON.stringify(obj));
}
// Inspired from https://github.com/nexedi/dream/blob/master/dream/platform/src/jsplumb/jsplumb.js#L398
function expandSchema(json_schema, full_schema, base_url) {
var i,
expanded_json_schema = clone(json_schema) || {};
if (!expanded_json_schema.properties) {
expanded_json_schema.properties = {};
}
return new RSVP.Queue().push(function () {
if (json_schema.$ref) {
return resolveReference(
json_schema,
full_schema,
base_url
)
.push(function (remote_schema) {
return expandSchema(
remote_schema,
full_schema,
base_url
);
}).push(function (referencedx) {
$.extend(expanded_json_schema, referencedx);
delete expanded_json_schema.$ref;
return true;
});
}
return true;
}).push(function () {
var property, queue = new RSVP.Queue();
function wrapperResolveReference(p) {
return resolveReference(
json_schema.properties[p],
full_schema,
base_url
).push(function (external_schema) {
// console.log(p);
return expandSchema(
external_schema,
full_schema,
base_url
)
.push(function (referencedx) {
$.extend(expanded_json_schema.properties[p], referencedx);
if (json_schema.properties[p].$ref) {
delete expanded_json_schema.properties[p].$ref;
}
return referencedx;
});
});
}
// expand ref in properties
for (property in json_schema.properties) {
if (json_schema.properties.hasOwnProperty(property)) {
queue.push(
wrapperResolveReference.bind(this, property)
);
}
}
return queue;
})
.push(function () {
var zqueue = new RSVP.Queue();
function wrapperExpandSchema(p) {
return expandSchema(
json_schema.allOf[p],
full_schema,
base_url
).push(function (referencedx) {
if (referencedx.properties) {
$.extend(
expanded_json_schema.properties,
referencedx.properties
);
delete referencedx.properties;
}
$.extend(expanded_json_schema, referencedx);
});
}
if (json_schema.allOf) {
for (i = 0; i < json_schema.allOf.length; i += 1) {
zqueue.push(wrapperExpandSchema.bind(this, i));
}
}
return zqueue;
})
.push(function () {
if (expanded_json_schema.allOf) {
delete expanded_json_schema.allOf;
}
if (expanded_json_schema.$ref) {
delete expanded_json_schema.$ref;
}
// console.log(expanded_json_schema);
return clone(expanded_json_schema);
});
}
function getMetaJSONSchema(serialisation) {
if (serialisation === "xml") {
return getJSON("slapos_load_meta_schema_xml.json");
}
if (serialisation === "json-in-xml") {
return getJSON("slapos_load_meta_schema_json_in_xml.json");
}
return getJSON("slapos_load_meta_schema.json");
}
function validateJSONSchema(json, base_url, serialisation) {
return getMetaJSONSchema(serialisation)
.push(function (meta_schema) {
if (!tv4.validate(json, meta_schema)) {
throw new Error("Non valid JSON schema " + json);
}
return JSON.parse(json);
})
.push(function (schema) {
return expandSchema(schema, schema, base_url);
});
}
function validateSoftwareJSONSchema(json) {
return getJSON("slapos_load_software_schema.json")
.push(function (schema) {
if (!tv4.validate(json, schema)) {
throw new Error("Non valid JSON for software.cfg.json:" + json);
}
return JSON.parse(json);
});
}
gk
rJS(window)
.declareMethod("getBaseUrl", function (url) {
var base_url, url_uri = URI(url);
base_url = url_uri.path().split("/");
......@@ -229,20 +38,46 @@
return base_url;
})
.declareMethod("loadJSONSchema", function (url, serialisation) {
var gadget = this;
return getJSON(url)
.push(function (json) {
return gadget.getBaseUrl(url)
.push(function (base_url) {
return validateJSONSchema(json, base_url, serialisation);
var meta_schema_url = "slapos_load_meta_schema.json";
if (serialisation === "xml") {
meta_schema_url = "slapos_load_meta_schema_xml.json";
}
if (serialisation === "json-in-xml") {
meta_schema_url = "slapos_load_meta_schema_json_in_xml.json";
}
return getJSON(meta_schema_url)
.push(function (meta_schema) {
return new RSVP.Queue()
.push(function () {
return $RefParser.dereference(url);
})
.push(function (schema) {
var validator = new Validator(JSON.parse(meta_schema), '7');
if (!validator.validate(schema)) {
throw new Error("Non valid JSON schema " + JSON.stringify(schema));
}
return schema;
});
});
})
.declareMethod("loadSoftwareJSON", function (url) {
return getJSON(url)
.push(function (json) {
return validateSoftwareJSONSchema(json);
.push(function (software_cfg_json) {
return new RSVP.Queue()
.push(function () {
return $RefParser
.dereference("slapos_load_software_schema.json");
})
.push(function (software_schema) {
var software_json = JSON.parse(software_cfg_json),
validator = new Validator(software_schema, '7');
if (!validator.validate(software_json)) {
throw new Error("Non valid JSON for software.cfg.json:" + software_cfg_json);
}
return software_json;
});
});
})
......@@ -255,13 +90,12 @@
}
}
return getJSON(parameter_schema_url)
.push(function (json) {
var schema = JSON.parse(json);
return expandSchema(schema, schema, base_url)
.push(function (loaded_json) {
return tv4.validateMultiple(generated_json, loaded_json);
});
return new RSVP.Queue()
.push(function () {
return $RefParser.dereference(parameter_schema_url);
})
.push(function (schema) {
return new Validator(schema, '7', false).validate(generated_json);
});
});
}(window, rJS, $, RSVP, btoa, URI, tv4));
}(window, rJS, RSVP, btoa, URI, Validator, jIO, JSON, $RefParser));
\ No newline at end of file
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.28125.59086.62805</string> </value>
<value> <string>1003.58311.45202.41659</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1583836689.5</float>
<float>1666754395.83</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint nomen: true, maxlen: 200, indent: 2, unparam: true*/
/*global rJS, console, window, document, RSVP, btoa, atob, $, XMLSerializer,
jQuery, URI, vkbeautify, domsugar, Boolean */
DOMParser, URI, vkbeautify, domsugar, Boolean */
(function (window, document, rJS, $, XMLSerializer, jQuery, vkbeautify,
loopEventListener, domsugar, Boolean) {
(function (window, document, rJS, $, XMLSerializer, DOMParser, vkbeautify,
domsugar, Boolean) {
"use strict";
var DISPLAY_JSON_FORM = 'display_json_form',
DISPLAY_RAW_XML = 'display_raw_xml';
//////////////////////////////////////////
// ParserError
//////////////////////////////////////////
function DOMParserError(message) {
this.name = "DOMParserError";
if ((message !== undefined) && (typeof message !== "string")) {
throw new TypeError('You must pass a string for DOMParserError.');
}
this.message = message || "Default Message";
}
DOMParserError.prototype = new Error();
DOMParserError.prototype.constructor = DOMParserError;
//////////////////////////////////////////
// DOMParser
//////////////////////////////////////////
function parseDocumentStringOrFail(string, mime_type) {
var doc = new DOMParser().parseFromString(string, mime_type),
error_node = doc.querySelector('parsererror');
if (error_node !== null) {
// parsing failed
throw new DOMParserError(error_node.textContent);
}
return doc;
}
function jsonDictToParameterXML(json) {
var parameter_id,
xml_output = $($.parseXML('<?xml version="1.0" encoding="UTF-8" ?><instance />'));
xml_output = parseDocumentStringOrFail(
'<?xml version="1.0" encoding="UTF-8" ?><instance />',
'text/xml'
),
xml_instance = xml_output.querySelector('instance'),
xml_parameter;
// Used by serialisation XML
for (parameter_id in json) {
if (json.hasOwnProperty(parameter_id)) {
$('instance', xml_output).append(
$('<parameter />', xml_output)
.text(json[parameter_id])
.attr({id: parameter_id})
);
xml_parameter = xml_output.createElement('parameter');
xml_parameter.textContent = json[parameter_id];
xml_parameter.id = parameter_id;
xml_instance.appendChild(xml_parameter);
}
}
return vkbeautify.xml(
(new XMLSerializer()).serializeToString(xml_output.context)
(new XMLSerializer()).serializeToString(xml_output)
);
}
function jsonDictToParameterJSONInXML(json) {
var xml_output = $($.parseXML('<?xml version="1.0" encoding="UTF-8" ?><instance />'));
// Used by serialisation XML
$('instance', xml_output).append(
$('<parameter />', xml_output)
.text(vkbeautify.json(JSON.stringify(json)))
.attr({id: "_"})
);
var content = vkbeautify.json(JSON.stringify(json)),
xml_output = parseDocumentStringOrFail(
'<?xml version="1.0" encoding="UTF-8" ?>' +
'<instance><parameter id="_">{}</parameter></instance>',
'text/xml'
);
xml_output.querySelector('parameter[id="_"]').textContent = content;
return vkbeautify.xml(
(new XMLSerializer()).serializeToString(xml_output.context)
(new XMLSerializer()).serializeToString(xml_output)
);
}
function render_selection(json_field, default_value) {
var option_list = [domsugar('option', {
value: "",
selected: (default_value === undefined)
})],
function render_selection(json_field, default_value, is_required) {
var property_dict = {size: 1},
option_list = [domsugar('option', {
value: "",
selected: (default_value === undefined)
})],
option_index,
selected,
is_selected = (default_value === undefined),
......@@ -77,16 +110,18 @@
value: default_value,
text: default_value,
"data-format": data_format,
selected: selected
selected: true
}));
}
return domsugar('select', {
size: 1,
"data-format": data_format
}, option_list);
property_dict["data-format"] = data_format;
if (is_required) {
property_dict.required = true;
}
return domsugar('select', property_dict, option_list);
}
function render_selection_oneof(json_field, default_value) {
function render_selection_oneof(json_field, default_value, is_required) {
var option_list = [domsugar('option', {
value: "",
selected: (default_value === undefined)
......@@ -114,29 +149,29 @@
}, option_list);
}
function render_textarea(json_field, default_value, data_format) {
var value = '';
function render_textarea(json_field, default_value, data_format, is_required) {
var property_dict = {"data-format": data_format};
if (default_value !== undefined) {
if (default_value instanceof Array) {
value = default_value.join("\n");
property_dict.value = default_value.join("\n");
} else {
value = default_value;
property_dict.value = default_value;
}
}
return domsugar('textarea', {
value: value,
"data-format": data_format
});
if (is_required) {
property_dict.required = true;
}
return domsugar('textarea', property_dict);
}
function render_field(json_field, default_value) {
function render_field(json_field, default_value, is_required) {
var data_format, domsugar_input_dict = {};
if (json_field['enum'] !== undefined) {
return render_selection(json_field, default_value);
return render_selection(json_field, default_value, is_required);
}
if (json_field.oneOf !== undefined) {
return render_selection_oneof(json_field, default_value);
return render_selection_oneof(json_field, default_value, is_required);
}
if (json_field.type === "boolean") {
......@@ -147,7 +182,7 @@
if (default_value === "false") {
default_value = false;
}
return render_selection(json_field, default_value);
return render_selection(json_field, default_value, is_required);
}
if (json_field.type === "array") {
......@@ -157,11 +192,11 @@
data_format = "array-number";
}
}
return render_textarea(json_field, default_value, data_format);
return render_textarea(json_field, default_value, data_format, is_required);
}
if (json_field.type === "string" && json_field.textarea === true) {
return render_textarea(json_field, default_value, "string");
return render_textarea(json_field, default_value, "string", is_required);
}
if (default_value !== undefined) {
......@@ -179,6 +214,10 @@
domsugar_input_dict.type = "text";
}
if (is_required) {
domsugar_input_dict.required = true;
}
return domsugar('input', domsugar_input_dict);
}
......@@ -192,7 +231,8 @@
default_used_list = [],
default_div,
span_error,
span_info;
span_info,
is_required;
if (default_dict === undefined) {
default_dict = {};
......@@ -260,17 +300,42 @@
}
}
// Expand by force the allOf recomposing the properties and required.
for (key in json_field.allOf) {
if (json_field.allOf.hasOwnProperty(key)) {
if (json_field.properties === undefined) {
json_field.properties = json_field.allOf[key].properties;
} else if (json_field.allOf[key].properties !== undefined) {
json_field.properties = Object.assign({},
json_field.properties,
json_field.allOf[key].properties
);
}
if (json_field.required === undefined) {
json_field.required = json_field.allOf[key].required;
} else if (json_field.allOf[key].required !== undefined) {
json_field.required.push.apply(
json_field.required,
json_field.allOf[key].required
);
}
}
}
for (key in json_field.properties) {
if (json_field.properties.hasOwnProperty(key)) {
div = document.createElement("div");
div.setAttribute("class", "subfield");
div.title = json_field.properties[key].description;
/* console.log(key); */
label = document.createElement("label");
label.textContent = json_field.properties[key].title;
div.appendChild(label);
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
is_required = false;
if ((Array.isArray(json_field.required)) && (json_field.required.includes(key))) {
is_required = true;
}
if (json_field.properties[key].type === 'object') {
label.setAttribute("class", "slapos-parameter-dict-key");
div_input = render_subform(json_field.properties[key],
......@@ -278,7 +343,11 @@
div_input,
path + "/" + key);
} else {
input = render_field(json_field.properties[key], default_dict[key]);
input = render_field(
json_field.properties[key],
default_dict[key],
is_required
);
input.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter");
input.setAttribute("placeholder", " ");
......@@ -317,7 +386,7 @@
div.appendChild(label);
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
input = render_field({"type": "string", "textarea": true}, default_dict[key]);
input = render_field({"type": "string", "textarea": true}, default_dict[key], false);
input.name = path + "/" + key;
input.setAttribute("class", "slapos-parameter");
input.setAttribute("placeholder", " ");
......@@ -564,11 +633,9 @@
parameter_hash_input = g.element.querySelectorAll('.parameter_hash_output')[0],
field_name,
div,
divm,
missing_index,
missing_field_name,
xml_output,
input_field;
input_field,
error_dict;
$(g.element.querySelectorAll("span.error")).each(function (i, span) {
span.textContent = "";
......@@ -577,43 +644,43 @@
$(g.element.querySelectorAll("div.error-input")).each(function (i, div) {
div.setAttribute("class", "");
});
if (serialisation_type === "json-in-xml") {
xml_output = jsonDictToParameterJSONInXML(json_dict);
} else {
xml_output = jsonDictToParameterXML(json_dict);
}
parameter_hash_input.value = btoa(xml_output);
// g.options.value.parameter.parameter_hash = btoa(xml_output);
// console.log(parameter_hash_input.value);
// console.log(xml_output);
if (validation.valid) {
return xml_output;
}
// Update fields if errors exist
for (error_index in validation.errors) {
if (validation.errors.hasOwnProperty(error_index)) {
field_name = validation.errors[error_index].dataPath;
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
if (input_field === null) {
field_name = field_name.split("/").slice(0, -1).join("/");
error_dict = validation.errors[error_index];
// error_dict = { error : "", instanceLocation: "#", keyword: "", keywordLocation: "" }
field_name = error_dict.instanceLocation.slice(1);
if (field_name !== "") {
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
if (input_field === null) {
field_name = field_name.split("/").slice(0, -1).join("/");
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
}
div = input_field.parentNode;
div.setAttribute("class", "slapos-parameter error-input");
div.querySelector("span.error").textContent = validation.errors[error_index].error;
} else if (error_dict.keyword === "required") {
// Specific use case for required
field_name = "/" + error_dict.key;
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
if (input_field === null) {
field_name = field_name.split("/").slice(0, -1).join("/");
input_field = g.element.querySelector(".slapos-parameter[name='/" + field_name + "']");
}
if (input_field !== null) {
div = input_field.parentNode;
div.setAttribute("class", "slapos-parameter error-input");
div.querySelector("span.error").textContent = error_dict.error;
}
}
div = input_field.parentNode;
div.setAttribute("class", "slapos-parameter error-input");
div.querySelector("span.error").textContent = validation.errors[error_index].message;
}
}
for (missing_index in validation.missing) {
if (validation.missing.hasOwnProperty(missing_index)) {
missing_field_name = validation.missing[missing_index].dataPath;
input_field = g.element.querySelector(".slapos-parameter[name='/" + missing_field_name + "']");
if (input_field === null) {
missing_field_name = field_name.split("/").slice(0, -1).join("/");
input_field = g.element.querySelector(".slapos-parameter[name='/" + missing_field_name + "']");
}
divm = input_field.parentNode;
divm.setAttribute("class", "error-input");
divm.querySelector("span.error").textContent = validation.missing[missing_index].message;
}
}
return xml_output;
......@@ -838,15 +905,19 @@
if (parameter_xml !== undefined) {
if (serialisation === "json-in-xml") {
parameter_list = jQuery.parseXML(
parameter_xml
parameter_list = parseDocumentStringOrFail(
parameter_xml,
'text/xml'
).querySelectorAll("parameter");
if (parameter_list.length > 1) {
throw new Error("The current parameter should contains only _ parameter (json-in-xml).");
}
parameter_entry = jQuery.parseXML(
parameter_xml
parameter_entry = parseDocumentStringOrFail(
parameter_xml,
'text/xml'
).querySelector("parameter[id='_']");
if (parameter_entry !== null) {
parameter_dict = JSON.parse(parameter_entry.textContent);
} else if (parameter_list.length === 1) {
......@@ -855,14 +926,18 @@
);
}
} else if (["", "xml"].indexOf(serialisation) >= 0) {
parameter_entry = jQuery.parseXML(
parameter_xml
parameter_entry = parseDocumentStringOrFail(
parameter_xml,
'text/xml'
).querySelector("parameter[id='_']");
if (parameter_entry !== null) {
throw new Error("The current parameter values should NOT contains _ parameter (xml).");
}
$(jQuery.parseXML(parameter_xml)
.querySelectorAll("parameter"))
$(parseDocumentStringOrFail(
parameter_xml,
'text/xml'
).querySelectorAll("parameter"))
.each(function (key, p) {
parameter_dict[p.id] = p.textContent;
});
......@@ -893,14 +968,12 @@
var i, div_list = gadget.element.querySelectorAll('.slapos-parameter-dict-key > div'),
label_list = gadget.element.querySelectorAll('label.slapos-parameter-dict-key');
// console.log("Collapse paramaters");
for (i = 0; i < div_list.length; i = i + 1) {
$(div_list[i]).hide();
}
for (i = 0; i < label_list.length; i = i + 1) {
$(label_list[i]).addClass("slapos-parameter-dict-key-colapse");
label_list[i].classList.add("slapos-parameter-dict-key-colapse");
}
})
......@@ -1080,22 +1153,5 @@
});
}, {mutex: 'statechange'});
//.declareService(function () {
// var gadget = this;
//return gadget.processValidation(gadget.options.json_url)
// .fail(function (error) {
// var parameter_xml = '';
// console.log(error.stack);
// if (gadget.options.value.parameter.parameter_hash !== undefined) {
// parameter_xml = atob(gadget.options.value.parameter.parameter_hash);
// }
// return gadget.renderFailoverTextArea(parameter_xml, error.toString())
// .push(function () {
// error = undefined;
// return gadget;
// });
// });
//});
}(window, document, rJS, $, XMLSerializer, jQuery, vkbeautify,
rJS.loopEventListener, domsugar, Boolean));
\ No newline at end of file
}(window, document, rJS, $, XMLSerializer, DOMParser, vkbeautify,
domsugar, Boolean));
\ No newline at end of file
......@@ -280,7 +280,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.42210.9826.36164</string> </value>
<value> <string>1003.61829.49064.29661</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>1656947623.15</float>
<float>1666975592.36</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -69,10 +69,17 @@
})
.declareMethod("render", function (options) {
var gadget = this;
if (options.url_string === undefined) {
options.url_string = "";
}
return this.changeState({
"url_string": options.url_string,
"parameter_output": options.parameter_output
})
})
.onStateChange(function onStateChange() {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
......@@ -85,19 +92,19 @@
parameter_dict,
default_url;
if (options.url_string === "") {
if (gadget.state.url_string === "") {
default_url = result[1] + "sample-software-schema/simpledemo/software.cfg";
} else {
default_url = options.url_string;
default_url = gadget.state.url_string;
}
if (options.parameter_output === undefined) {
if (gadget.state.parameter_output === undefined) {
parameter_hash = btoa('<?xml version="1.0" encoding="utf-8" ?><instance></instance>');
} else {
parameter_hash = btoa(options.parameter_output);
parameter_hash = btoa(gadget.state.parameter_output);
}
parameter_dict = {
'parameter' : {
'json_url': options.url_string.split('?')[0] + ".json",
'json_url': gadget.state.url_string.split('?')[0] + ".json",
'parameter_hash': parameter_hash,
'restricted_softwaretype': false
}
......@@ -111,7 +118,7 @@
"default": default_url,
"css_class": "",
"required": 1,
"editable": options.url_string === "",
"editable": gadget.state.url_string === "",
"key": "url_string",
"hidden": 0,
"type": "StringField"
......@@ -122,25 +129,38 @@
"default": parameter_dict,
"css_class": "",
"required": 1,
"editable": options.url_string !== "",
"editable": gadget.state.url_string !== "",
"url": "gadget_erp5_page_slap_parameter_form.html",
"sandbox": "",
"key": "text_content",
"hidden": options.url_string === "",
"hidden": gadget.state.url_string === "",
"type": "GadgetField"
},
"your_parameter_output": {
"description": "",
"title": "Parameters Output",
"default": options.parameter_output,
"default": gadget.state.parameter_output,
"css_class": "",
"required": 0,
"editable": 0,
"sandbox": "",
"key": "parameter_output",
"hidden": options.parameter_output === undefined,
"hidden": gadget.state.parameter_output === undefined,
"type": "TextAreaField"
}
},
"your_parameter_hash": {
"description": "",
"title": "Parameters Hash",
"default": parameter_hash,
"css_class": "",
"required": 0,
"editable": 0,
"sandbox": "",
"key": "parameter_hash",
"hidden": gadget.state.parameter_output === undefined,
"type": "StringField"
},
}},
"_links": {
"type": {
......@@ -152,13 +172,19 @@
form_definition: {
group_list: [[
"center",
[["my_url_string"], ["your_parameter_output"], ["your_text_content"]]
[["my_url_string"], ["your_parameter_output"], ["your_parameter_hash"], ["your_text_content"]]
]]
}
})
.push(function () {
return gadget.getUrlFor({"command": "change",
"options": {"url_string": undefined,
"parameter_output": undefined}});
})
.push(function (selection_url) {
return gadget.updateHeader({
page_title: "Parameter testing page",
selection_url: selection_url,
submit_action: true
});
});
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.3592.26006.62702</string> </value>
<value> <string>1003.56162.18447.41164</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1652201764.17</float>
<float>1666635866.16</float>
<string>UTC</string>
</tuple>
</state>
......
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"positiveInteger": {
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
"nonNegativeIntegerDefault0": {
"allOf": [
{ "$ref": "#/definitions/nonNegativeInteger" },
{ "default": 0 }
]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"uniqueItems": true
"uniqueItems": true,
"default": []
}
},
"type": "object",
"type": ["object", "boolean"],
"properties": {
"id": {
"type": "string",
"format": "uri"
"$id": {
"type": "string"
},
"$schema": {
"type": "string",
"format": "uri"
"type": "string"
},
"$ref": {
"type": "string"
},
"$comment": {
"type": "string"
},
"title": {
"type": "string"
......@@ -41,62 +55,59 @@
"description": {
"type": "string"
},
"default": {},
"default": true,
"readOnly": {
"type": "boolean",
"default": false
},
"writeOnly": {
"type": "boolean",
"default": false
},
"examples": {
"type": "array",
"items": true
},
"multipleOf": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "boolean",
"default": false
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "boolean",
"default": false
"type": "number"
},
"maxLength": { "$ref": "#/definitions/positiveInteger" },
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
"type": "string"
},
"additionalItems": { "$ref": "#" },
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
"default": true
},
"maxItems": { "$ref": "#/definitions/positiveInteger" },
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"additionalProperties": { "$ref": "#" },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
......@@ -110,6 +121,7 @@
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"propertyNames": {},
"default": {}
},
"dependencies": {
......@@ -121,8 +133,11 @@
]
}
},
"propertyNames": { "$ref": "#" },
"const": true,
"enum": {
"type": "array",
"items": true,
"minItems": 1,
"uniqueItems": true
},
......@@ -137,14 +152,16 @@
}
]
},
"format": { "type": "string" },
"contentMediaType": { "type": "string" },
"contentEncoding": { "type": "string" },
"if": { "$ref": "#" },
"then": { "$ref": "#" },
"else": { "$ref": "#" },
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
},
"default": {}
"default": true
}
\ No newline at end of file
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.27453.45440.44629</string> </value>
<value> <string>1003.46346.29825.45516</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1649434525.63</float>
<float>1666036519.04</float>
<string>UTC</string>
</tuple>
</state>
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Slapos Software Release instantiation descriptor",
"additionalProperties": false,
"required": [
......@@ -83,4 +83,4 @@
}
},
"type": "object"
}
\ No newline at end of file
}
......@@ -239,7 +239,7 @@ https://lab.nexedi.com/nexedi/slapos/raw/master/schema.json#</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.32250.5458.58606</string> </value>
<value> <string>1003.46353.55894.19370</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@ https://lab.nexedi.com/nexedi/slapos/raw/master/schema.json#</string> </value>
</tuple>
<state>
<tuple>
<float>1649721266.53</float>
<float>1666036947.97</float>
<string>UTC</string>
</tuple>
</state>
......
!function(a,b){"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports?module.exports=b():a.tv4=b()}(this,function(){function a(a){return encodeURI(a).replace(/%25[0-9][0-9]/g,function(a){return"%"+a.substring(3)})}function b(b){var c="";l[b.charAt(0)]&&(c=b.charAt(0),b=b.substring(1));var d="",e="",f=!0,g=!1,h=!1;"+"===c?f=!1:"."===c?(e=".",d="."):"/"===c?(e="/",d="/"):"#"===c?(e="#",f=!1):";"===c?(e=";",d=";",g=!0,h=!0):"?"===c?(e="?",d="&",g=!0):"&"===c&&(e="&",d="&",g=!0);for(var i=[],j=b.split(","),k=[],n={},o=0;o<j.length;o++){var p=j[o],q=null;if(-1!==p.indexOf(":")){var r=p.split(":");p=r[0],q=parseInt(r[1],10)}for(var s={};m[p.charAt(p.length-1)];)s[p.charAt(p.length-1)]=!0,p=p.substring(0,p.length-1);var t={truncate:q,name:p,suffices:s};k.push(t),n[p]=t,i.push(p)}var u=function(b){for(var c="",i=0,j=0;j<k.length;j++){var l=k[j],m=b(l.name);if(null===m||void 0===m||Array.isArray(m)&&0===m.length||"object"==typeof m&&0===Object.keys(m).length)i++;else if(c+=j===i?e:d||",",Array.isArray(m)){g&&(c+=l.name+"=");for(var n=0;n<m.length;n++)n>0&&(c+=l.suffices["*"]?d||",":",",l.suffices["*"]&&g&&(c+=l.name+"=")),c+=f?encodeURIComponent(m[n]).replace(/!/g,"%21"):a(m[n])}else if("object"==typeof m){g&&!l.suffices["*"]&&(c+=l.name+"=");var o=!0;for(var p in m)o||(c+=l.suffices["*"]?d||",":","),o=!1,c+=f?encodeURIComponent(p).replace(/!/g,"%21"):a(p),c+=l.suffices["*"]?"=":",",c+=f?encodeURIComponent(m[p]).replace(/!/g,"%21"):a(m[p])}else g&&(c+=l.name,h&&""===m||(c+="=")),null!=l.truncate&&(m=m.substring(0,l.truncate)),c+=f?encodeURIComponent(m).replace(/!/g,"%21"):a(m)}return c};return u.varNames=i,{prefix:e,substitution:u}}function c(a){if(!(this instanceof c))return new c(a);for(var d=a.split("{"),e=[d.shift()],f=[],g=[],h=[];d.length>0;){var i=d.shift(),j=i.split("}")[0],k=i.substring(j.length+1),l=b(j);g.push(l.substitution),f.push(l.prefix),e.push(k),h=h.concat(l.substitution.varNames)}this.fill=function(a){for(var b=e[0],c=0;c<g.length;c++){var d=g[c];b+=d(a),b+=e[c+1]}return b},this.varNames=h,this.template=a}function d(a,b){if(a===b)return!0;if("object"==typeof a&&"object"==typeof b){if(Array.isArray(a)!==Array.isArray(b))return!1;if(Array.isArray(a)){if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!d(a[c],b[c]))return!1}else{var e;for(e in a)if(void 0===b[e]&&void 0!==a[e])return!1;for(e in b)if(void 0===a[e]&&void 0!==b[e])return!1;for(e in a)if(!d(a[e],b[e]))return!1}return!0}return!1}function e(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function f(a,b){function c(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}return b=e(b||""),a=e(a||""),b&&a?(b.protocol||a.protocol)+(b.protocol||b.authority?b.authority:a.authority)+c(b.protocol||b.authority||"/"===b.pathname.charAt(0)?b.pathname:b.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+b.pathname:a.pathname)+(b.protocol||b.authority||b.pathname?b.search:b.search||a.search)+b.hash:null}function g(a){return a.split("#")[0]}function h(a,b){if(a&&"object"==typeof a)if(void 0===b?b=a.id:"string"==typeof a.id&&(b=f(b,a.id),a.id=b),Array.isArray(a))for(var c=0;c<a.length;c++)h(a[c],b);else{"string"==typeof a.$ref&&(a.$ref=f(b,a.$ref));for(var d in a)"enum"!==d&&h(a[d],b)}}function i(a,b,c,d,e,f){if(Error.call(this),void 0===a)throw new Error("No code supplied for error: "+b);this.message=b,this.params=c,this.code=a,this.dataPath=d||"",this.schemaPath=e||"",this.subErrors=f||null;var g=new Error(this.message);if(this.stack=g.stack||g.stacktrace,!this.stack)try{throw g}catch(g){this.stack=g.stack||g.stacktrace}}function j(a,b){if(b.substring(0,a.length)===a){var c=b.substring(a.length);if(b.length>0&&"/"===b.charAt(a.length-1)||"#"===c.charAt(0)||"?"===c.charAt(0))return!0}return!1}function k(a){var b=new n,c=a||"en",d={addFormat:function(){b.addFormat.apply(b,arguments)},language:function(a){return a?(s[a]||(a=a.split("-")[0]),s[a]?(c=a,a):!1):c},addLanguage:function(a,b){var c;for(c in o)b[c]&&!b[o[c]]&&(b[o[c]]=b[c]);var d=a.split("-")[0];if(s[d]){s[a]=Object.create(s[d]);for(c in b)"undefined"==typeof s[d][c]&&(s[d][c]=b[c]),s[a][c]=b[c]}else s[a]=b,s[d]=b;return this},freshApi:function(a){var b=k();return a&&b.language(a),b},validate:function(a,d,e,f){var g=new n(b,!1,s[c],e,f);"string"==typeof d&&(d={$ref:d}),g.addSchema("",d);var h=g.validateAll(a,d,null,null,"");return!h&&f&&(h=g.banUnknownProperties()),this.error=h,this.missing=g.missing,this.valid=null===h,this.valid},validateResult:function(){var a={};return this.validate.apply(a,arguments),a},validateMultiple:function(a,d,e,f){var g=new n(b,!0,s[c],e,f);"string"==typeof d&&(d={$ref:d}),g.addSchema("",d),g.validateAll(a,d,null,null,""),f&&g.banUnknownProperties();var h={};return h.errors=g.errors,h.missing=g.missing,h.valid=0===h.errors.length,h},addSchema:function(){return b.addSchema.apply(b,arguments)},getSchema:function(){return b.getSchema.apply(b,arguments)},getSchemaMap:function(){return b.getSchemaMap.apply(b,arguments)},getSchemaUris:function(){return b.getSchemaUris.apply(b,arguments)},getMissingUris:function(){return b.getMissingUris.apply(b,arguments)},dropSchemas:function(){b.dropSchemas.apply(b,arguments)},defineKeyword:function(){b.defineKeyword.apply(b,arguments)},defineError:function(a,b,c){if("string"!=typeof a||!/^[A-Z]+(_[A-Z]+)*$/.test(a))throw new Error("Code name must be a string in UPPER_CASE_WITH_UNDERSCORES");if("number"!=typeof b||b%1!==0||1e4>b)throw new Error("Code number must be an integer > 10000");if("undefined"!=typeof o[a])throw new Error("Error already defined: "+a+" as "+o[a]);if("undefined"!=typeof p[b])throw new Error("Error code already used: "+p[b]+" as "+b);o[a]=b,p[b]=a,r[a]=r[b]=c;for(var d in s){var e=s[d];e[a]&&(e[b]=e[b]||e[a])}},reset:function(){b.reset(),this.error=null,this.missing=[],this.valid=!0},missing:[],error:null,valid:!0,normSchema:h,resolveUrl:f,getDocumentUri:g,errorCodes:o};return d}Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on non-object");var f=[];for(var g in e)a.call(e,g)&&f.push(g);if(b)for(var h=0;d>h;h++)a.call(e,c[h])&&f.push(c[h]);return f}}()),Object.create||(Object.create=function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return a.prototype=b,new a}}()),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!==d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Object.isFrozen||(Object.isFrozen=function(a){for(var b="tv4_test_frozen_key";a.hasOwnProperty(b);)b+=Math.random();try{return a[b]=!0,delete a[b],!1}catch(c){return!0}});var l={"+":!0,"#":!0,".":!0,"/":!0,";":!0,"?":!0,"&":!0},m={"*":!0};c.prototype={toString:function(){return this.template},fillFromObject:function(a){return this.fill(function(b){return a[b]})}};var n=function(a,b,c,d,e){if(this.missing=[],this.missingMap={},this.formatValidators=a?Object.create(a.formatValidators):{},this.schemas=a?Object.create(a.schemas):{},this.collectMultiple=b,this.errors=[],this.handleError=b?this.collectError:this.returnError,d&&(this.checkRecursive=!0,this.scanned=[],this.scannedFrozen=[],this.scannedFrozenSchemas=[],this.scannedFrozenValidationErrors=[],this.validatedSchemasKey="tv4_validation_id",this.validationErrorsKey="tv4_validation_errors_id"),e&&(this.trackUnknownProperties=!0,this.knownPropertyPaths={},this.unknownPropertyPaths={}),this.errorMessages=c,this.definedKeywords={},a)for(var f in a.definedKeywords)this.definedKeywords[f]=a.definedKeywords[f].slice(0)};n.prototype.defineKeyword=function(a,b){this.definedKeywords[a]=this.definedKeywords[a]||[],this.definedKeywords[a].push(b)},n.prototype.createError=function(a,b,c,d,e){var f=this.errorMessages[a]||r[a];if("string"!=typeof f)return new i(a,"Unknown error code "+a+": "+JSON.stringify(b),b,c,d,e);var g=f.replace(/\{([^{}]*)\}/g,function(a,c){var d=b[c];return"string"==typeof d||"number"==typeof d?d:a});return new i(a,g,b,c,d,e)},n.prototype.returnError=function(a){return a},n.prototype.collectError=function(a){return a&&this.errors.push(a),null},n.prototype.prefixErrors=function(a,b,c){for(var d=a;d<this.errors.length;d++)this.errors[d]=this.errors[d].prefixWith(b,c);return this},n.prototype.banUnknownProperties=function(){for(var a in this.unknownPropertyPaths){var b=this.createError(o.UNKNOWN_PROPERTY,{path:a},a,""),c=this.handleError(b);if(c)return c}return null},n.prototype.addFormat=function(a,b){if("object"==typeof a){for(var c in a)this.addFormat(c,a[c]);return this}this.formatValidators[a]=b},n.prototype.resolveRefs=function(a,b){if(void 0!==a.$ref){if(b=b||{},b[a.$ref])return this.createError(o.CIRCULAR_REFERENCE,{urls:Object.keys(b).join(", ")},"","");b[a.$ref]=!0,a=this.getSchema(a.$ref,b)}return a},n.prototype.getSchema=function(a,b){var c;if(void 0!==this.schemas[a])return c=this.schemas[a],this.resolveRefs(c,b);var d=a,e="";if(-1!==a.indexOf("#")&&(e=a.substring(a.indexOf("#")+1),d=a.substring(0,a.indexOf("#"))),"object"==typeof this.schemas[d]){c=this.schemas[d];var f=decodeURIComponent(e);if(""===f)return this.resolveRefs(c,b);if("/"!==f.charAt(0))return void 0;for(var g=f.split("/").slice(1),h=0;h<g.length;h++){var i=g[h].replace(/~1/g,"/").replace(/~0/g,"~");if(void 0===c[i]){c=void 0;break}c=c[i]}if(void 0!==c)return this.resolveRefs(c,b)}void 0===this.missing[d]&&(this.missing.push(d),this.missing[d]=d,this.missingMap[d]=d)},n.prototype.searchSchemas=function(a,b){if(a&&"object"==typeof a){"string"==typeof a.id&&j(b,a.id)&&void 0===this.schemas[a.id]&&(this.schemas[a.id]=a);for(var c in a)if("enum"!==c)if("object"==typeof a[c])this.searchSchemas(a[c],b);else if("$ref"===c){var d=g(a[c]);d&&void 0===this.schemas[d]&&void 0===this.missingMap[d]&&(this.missingMap[d]=d)}}},n.prototype.addSchema=function(a,b){if("string"!=typeof a||"undefined"==typeof b){if("object"!=typeof a||"string"!=typeof a.id)return;b=a,a=b.id}a===g(a)+"#"&&(a=g(a)),this.schemas[a]=b,delete this.missingMap[a],h(b,a),this.searchSchemas(b,a)},n.prototype.getSchemaMap=function(){var a={};for(var b in this.schemas)a[b]=this.schemas[b];return a},n.prototype.getSchemaUris=function(a){var b=[];for(var c in this.schemas)(!a||a.test(c))&&b.push(c);return b},n.prototype.getMissingUris=function(a){var b=[];for(var c in this.missingMap)(!a||a.test(c))&&b.push(c);return b},n.prototype.dropSchemas=function(){this.schemas={},this.reset()},n.prototype.reset=function(){this.missing=[],this.missingMap={},this.errors=[]},n.prototype.validateAll=function(a,b,c,d,e){var f;if(b=this.resolveRefs(b),!b)return null;if(b instanceof i)return this.errors.push(b),b;var g,h=this.errors.length,j=null,k=null;if(this.checkRecursive&&a&&"object"==typeof a){if(f=!this.scanned.length,a[this.validatedSchemasKey]){var l=a[this.validatedSchemasKey].indexOf(b);if(-1!==l)return this.errors=this.errors.concat(a[this.validationErrorsKey][l]),null}if(Object.isFrozen(a)&&(g=this.scannedFrozen.indexOf(a),-1!==g)){var m=this.scannedFrozenSchemas[g].indexOf(b);if(-1!==m)return this.errors=this.errors.concat(this.scannedFrozenValidationErrors[g][m]),null}if(this.scanned.push(a),Object.isFrozen(a))-1===g&&(g=this.scannedFrozen.length,this.scannedFrozen.push(a),this.scannedFrozenSchemas.push([])),j=this.scannedFrozenSchemas[g].length,this.scannedFrozenSchemas[g][j]=b,this.scannedFrozenValidationErrors[g][j]=[];else{if(!a[this.validatedSchemasKey])try{Object.defineProperty(a,this.validatedSchemasKey,{value:[],configurable:!0}),Object.defineProperty(a,this.validationErrorsKey,{value:[],configurable:!0})}catch(n){a[this.validatedSchemasKey]=[],a[this.validationErrorsKey]=[]}k=a[this.validatedSchemasKey].length,a[this.validatedSchemasKey][k]=b,a[this.validationErrorsKey][k]=[]}}var o=this.errors.length,p=this.validateBasic(a,b,e)||this.validateNumeric(a,b,e)||this.validateString(a,b,e)||this.validateArray(a,b,e)||this.validateObject(a,b,e)||this.validateCombinations(a,b,e)||this.validateHypermedia(a,b,e)||this.validateFormat(a,b,e)||this.validateDefinedKeywords(a,b,e)||null;if(f){for(;this.scanned.length;){var q=this.scanned.pop();delete q[this.validatedSchemasKey]}this.scannedFrozen=[],this.scannedFrozenSchemas=[]}if(p||o!==this.errors.length)for(;c&&c.length||d&&d.length;){var r=c&&c.length?""+c.pop():null,s=d&&d.length?""+d.pop():null;p&&(p=p.prefixWith(r,s)),this.prefixErrors(o,r,s)}return null!==j?this.scannedFrozenValidationErrors[g][j]=this.errors.slice(h):null!==k&&(a[this.validationErrorsKey][k]=this.errors.slice(h)),this.handleError(p)},n.prototype.validateFormat=function(a,b){if("string"!=typeof b.format||!this.formatValidators[b.format])return null;var c=this.formatValidators[b.format].call(null,a,b);return"string"==typeof c||"number"==typeof c?this.createError(o.FORMAT_CUSTOM,{message:c}).prefixWith(null,"format"):c&&"object"==typeof c?this.createError(o.FORMAT_CUSTOM,{message:c.message||"?"},c.dataPath||null,c.schemaPath||"/format"):null},n.prototype.validateDefinedKeywords=function(a,b){for(var c in this.definedKeywords)if("undefined"!=typeof b[c])for(var d=this.definedKeywords[c],e=0;e<d.length;e++){var f=d[e],g=f(a,b[c],b);if("string"==typeof g||"number"==typeof g)return this.createError(o.KEYWORD_CUSTOM,{key:c,message:g}).prefixWith(null,"format");if(g&&"object"==typeof g){var h=g.code||o.KEYWORD_CUSTOM;if("string"==typeof h){if(!o[h])throw new Error("Undefined error code (use defineError): "+h);h=o[h]}var i="object"==typeof g.message?g.message:{key:c,message:g.message||"?"},j=g.schemaPath||"/"+c.replace(/~/g,"~0").replace(/\//g,"~1");return this.createError(h,i,g.dataPath||null,j)}}return null},n.prototype.validateBasic=function(a,b,c){var d;return(d=this.validateType(a,b,c))?d.prefixWith(null,"type"):(d=this.validateEnum(a,b,c))?d.prefixWith(null,"type"):null},n.prototype.validateType=function(a,b){if(void 0===b.type)return null;var c=typeof a;null===a?c="null":Array.isArray(a)&&(c="array");var d=b.type;"object"!=typeof d&&(d=[d]);for(var e=0;e<d.length;e++){var f=d[e];if(f===c||"integer"===f&&"number"===c&&a%1===0)return null}return this.createError(o.INVALID_TYPE,{type:c,expected:d.join("/")})},n.prototype.validateEnum=function(a,b){if(void 0===b["enum"])return null;for(var c=0;c<b["enum"].length;c++){var e=b["enum"][c];if(d(a,e))return null}return this.createError(o.ENUM_MISMATCH,{value:"undefined"!=typeof JSON?JSON.stringify(a):a})},n.prototype.validateNumeric=function(a,b,c){return this.validateMultipleOf(a,b,c)||this.validateMinMax(a,b,c)||null},n.prototype.validateMultipleOf=function(a,b){var c=b.multipleOf||b.divisibleBy;return void 0===c?null:"number"==typeof a&&a%c!==0?this.createError(o.NUMBER_MULTIPLE_OF,{value:a,multipleOf:c}):null},n.prototype.validateMinMax=function(a,b){if("number"!=typeof a)return null;if(void 0!==b.minimum){if(a<b.minimum)return this.createError(o.NUMBER_MINIMUM,{value:a,minimum:b.minimum}).prefixWith(null,"minimum");if(b.exclusiveMinimum&&a===b.minimum)return this.createError(o.NUMBER_MINIMUM_EXCLUSIVE,{value:a,minimum:b.minimum}).prefixWith(null,"exclusiveMinimum")}if(void 0!==b.maximum){if(a>b.maximum)return this.createError(o.NUMBER_MAXIMUM,{value:a,maximum:b.maximum}).prefixWith(null,"maximum");if(b.exclusiveMaximum&&a===b.maximum)return this.createError(o.NUMBER_MAXIMUM_EXCLUSIVE,{value:a,maximum:b.maximum}).prefixWith(null,"exclusiveMaximum")}return null},n.prototype.validateString=function(a,b,c){return this.validateStringLength(a,b,c)||this.validateStringPattern(a,b,c)||null},n.prototype.validateStringLength=function(a,b){return"string"!=typeof a?null:void 0!==b.minLength&&a.length<b.minLength?this.createError(o.STRING_LENGTH_SHORT,{length:a.length,minimum:b.minLength}).prefixWith(null,"minLength"):void 0!==b.maxLength&&a.length>b.maxLength?this.createError(o.STRING_LENGTH_LONG,{length:a.length,maximum:b.maxLength}).prefixWith(null,"maxLength"):null},n.prototype.validateStringPattern=function(a,b){if("string"!=typeof a||void 0===b.pattern)return null;var c=new RegExp(b.pattern);return c.test(a)?null:this.createError(o.STRING_PATTERN,{pattern:b.pattern}).prefixWith(null,"pattern")},n.prototype.validateArray=function(a,b,c){return Array.isArray(a)?this.validateArrayLength(a,b,c)||this.validateArrayUniqueItems(a,b,c)||this.validateArrayItems(a,b,c)||null:null},n.prototype.validateArrayLength=function(a,b){var c;return void 0!==b.minItems&&a.length<b.minItems&&(c=this.createError(o.ARRAY_LENGTH_SHORT,{length:a.length,minimum:b.minItems}).prefixWith(null,"minItems"),this.handleError(c))?c:void 0!==b.maxItems&&a.length>b.maxItems&&(c=this.createError(o.ARRAY_LENGTH_LONG,{length:a.length,maximum:b.maxItems}).prefixWith(null,"maxItems"),this.handleError(c))?c:null},n.prototype.validateArrayUniqueItems=function(a,b){if(b.uniqueItems)for(var c=0;c<a.length;c++)for(var e=c+1;e<a.length;e++)if(d(a[c],a[e])){var f=this.createError(o.ARRAY_UNIQUE,{match1:c,match2:e}).prefixWith(null,"uniqueItems");if(this.handleError(f))return f}return null},n.prototype.validateArrayItems=function(a,b,c){if(void 0===b.items)return null;var d,e;if(Array.isArray(b.items)){for(e=0;e<a.length;e++)if(e<b.items.length){if(d=this.validateAll(a[e],b.items[e],[e],["items",e],c+"/"+e))return d}else if(void 0!==b.additionalItems)if("boolean"==typeof b.additionalItems){if(!b.additionalItems&&(d=this.createError(o.ARRAY_ADDITIONAL_ITEMS,{}).prefixWith(""+e,"additionalItems"),this.handleError(d)))return d}else if(d=this.validateAll(a[e],b.additionalItems,[e],["additionalItems"],c+"/"+e))return d}else for(e=0;e<a.length;e++)if(d=this.validateAll(a[e],b.items,[e],["items"],c+"/"+e))return d;return null},n.prototype.validateObject=function(a,b,c){return"object"!=typeof a||null===a||Array.isArray(a)?null:this.validateObjectMinMaxProperties(a,b,c)||this.validateObjectRequiredProperties(a,b,c)||this.validateObjectProperties(a,b,c)||this.validateObjectDependencies(a,b,c)||null},n.prototype.validateObjectMinMaxProperties=function(a,b){var c,d=Object.keys(a);return void 0!==b.minProperties&&d.length<b.minProperties&&(c=this.createError(o.OBJECT_PROPERTIES_MINIMUM,{propertyCount:d.length,minimum:b.minProperties}).prefixWith(null,"minProperties"),this.handleError(c))?c:void 0!==b.maxProperties&&d.length>b.maxProperties&&(c=this.createError(o.OBJECT_PROPERTIES_MAXIMUM,{propertyCount:d.length,maximum:b.maxProperties}).prefixWith(null,"maxProperties"),this.handleError(c))?c:null},n.prototype.validateObjectRequiredProperties=function(a,b){if(void 0!==b.required)for(var c=0;c<b.required.length;c++){var d=b.required[c];if(void 0===a[d]){var e=this.createError(o.OBJECT_REQUIRED,{key:d}).prefixWith(null,""+c).prefixWith(null,"required");if(this.handleError(e))return e}}return null},n.prototype.validateObjectProperties=function(a,b,c){var d;for(var e in a){var f=c+"/"+e.replace(/~/g,"~0").replace(/\//g,"~1"),g=!1;if(void 0!==b.properties&&void 0!==b.properties[e]&&(g=!0,d=this.validateAll(a[e],b.properties[e],[e],["properties",e],f)))return d;if(void 0!==b.patternProperties)for(var h in b.patternProperties){var i=new RegExp(h);if(i.test(e)&&(g=!0,d=this.validateAll(a[e],b.patternProperties[h],[e],["patternProperties",h],f)))return d}if(g)this.trackUnknownProperties&&(this.knownPropertyPaths[f]=!0,delete this.unknownPropertyPaths[f]);else if(void 0!==b.additionalProperties){if(this.trackUnknownProperties&&(this.knownPropertyPaths[f]=!0,delete this.unknownPropertyPaths[f]),"boolean"==typeof b.additionalProperties){if(!b.additionalProperties&&(d=this.createError(o.OBJECT_ADDITIONAL_PROPERTIES,{}).prefixWith(e,"additionalProperties"),this.handleError(d)))return d}else if(d=this.validateAll(a[e],b.additionalProperties,[e],["additionalProperties"],f))return d}else this.trackUnknownProperties&&!this.knownPropertyPaths[f]&&(this.unknownPropertyPaths[f]=!0)}return null},n.prototype.validateObjectDependencies=function(a,b,c){var d;if(void 0!==b.dependencies)for(var e in b.dependencies)if(void 0!==a[e]){var f=b.dependencies[e];if("string"==typeof f){if(void 0===a[f]&&(d=this.createError(o.OBJECT_DEPENDENCY_KEY,{key:e,missing:f}).prefixWith(null,e).prefixWith(null,"dependencies"),this.handleError(d)))return d}else if(Array.isArray(f))for(var g=0;g<f.length;g++){var h=f[g];if(void 0===a[h]&&(d=this.createError(o.OBJECT_DEPENDENCY_KEY,{key:e,missing:h}).prefixWith(null,""+g).prefixWith(null,e).prefixWith(null,"dependencies"),this.handleError(d)))return d}else if(d=this.validateAll(a,f,[],["dependencies",e],c))return d}return null},n.prototype.validateCombinations=function(a,b,c){return this.validateAllOf(a,b,c)||this.validateAnyOf(a,b,c)||this.validateOneOf(a,b,c)||this.validateNot(a,b,c)||null},n.prototype.validateAllOf=function(a,b,c){if(void 0===b.allOf)return null;for(var d,e=0;e<b.allOf.length;e++){var f=b.allOf[e];if(d=this.validateAll(a,f,[],["allOf",e],c))return d}return null},n.prototype.validateAnyOf=function(a,b,c){if(void 0===b.anyOf)return null;var d,e,f=[],g=this.errors.length;this.trackUnknownProperties&&(d=this.unknownPropertyPaths,e=this.knownPropertyPaths);for(var h=!0,i=0;i<b.anyOf.length;i++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var j=b.anyOf[i],k=this.errors.length,l=this.validateAll(a,j,[],["anyOf",i],c);if(null===l&&k===this.errors.length){if(this.errors=this.errors.slice(0,g),this.trackUnknownProperties){for(var m in this.knownPropertyPaths)e[m]=!0,delete d[m];for(var n in this.unknownPropertyPaths)e[n]||(d[n]=!0);h=!1;continue}return null}l&&f.push(l.prefixWith(null,""+i).prefixWith(null,"anyOf"))}return this.trackUnknownProperties&&(this.unknownPropertyPaths=d,this.knownPropertyPaths=e),h?(f=f.concat(this.errors.slice(g)),this.errors=this.errors.slice(0,g),this.createError(o.ANY_OF_MISSING,{},"","/anyOf",f)):void 0},n.prototype.validateOneOf=function(a,b,c){if(void 0===b.oneOf)return null;var d,e,f=null,g=[],h=this.errors.length;this.trackUnknownProperties&&(d=this.unknownPropertyPaths,e=this.knownPropertyPaths);for(var i=0;i<b.oneOf.length;i++){this.trackUnknownProperties&&(this.unknownPropertyPaths={},this.knownPropertyPaths={});var j=b.oneOf[i],k=this.errors.length,l=this.validateAll(a,j,[],["oneOf",i],c);if(null===l&&k===this.errors.length){if(null!==f)return this.errors=this.errors.slice(0,h),this.createError(o.ONE_OF_MULTIPLE,{index1:f,index2:i},"","/oneOf");if(f=i,this.trackUnknownProperties){for(var m in this.knownPropertyPaths)e[m]=!0,delete d[m];for(var n in this.unknownPropertyPaths)e[n]||(d[n]=!0)}}else l&&g.push(l)}return this.trackUnknownProperties&&(this.unknownPropertyPaths=d,this.knownPropertyPaths=e),null===f?(g=g.concat(this.errors.slice(h)),this.errors=this.errors.slice(0,h),this.createError(o.ONE_OF_MISSING,{},"","/oneOf",g)):(this.errors=this.errors.slice(0,h),null)},n.prototype.validateNot=function(a,b,c){if(void 0===b.not)return null;var d,e,f=this.errors.length;this.trackUnknownProperties&&(d=this.unknownPropertyPaths,e=this.knownPropertyPaths,this.unknownPropertyPaths={},this.knownPropertyPaths={});var g=this.validateAll(a,b.not,null,null,c),h=this.errors.slice(f);return this.errors=this.errors.slice(0,f),this.trackUnknownProperties&&(this.unknownPropertyPaths=d,this.knownPropertyPaths=e),null===g&&0===h.length?this.createError(o.NOT_PASSED,{},"","/not"):null},n.prototype.validateHypermedia=function(a,b,d){if(!b.links)return null;for(var e,f=0;f<b.links.length;f++){var g=b.links[f];if("describedby"===g.rel){for(var h=new c(g.href),i=!0,j=0;j<h.varNames.length;j++)if(!(h.varNames[j]in a)){i=!1;break}if(i){var k=h.fillFromObject(a),l={$ref:k};if(e=this.validateAll(a,l,[],["links",f],d))return e}}}};var o={INVALID_TYPE:0,ENUM_MISMATCH:1,ANY_OF_MISSING:10,ONE_OF_MISSING:11,ONE_OF_MULTIPLE:12,NOT_PASSED:13,NUMBER_MULTIPLE_OF:100,NUMBER_MINIMUM:101,NUMBER_MINIMUM_EXCLUSIVE:102,NUMBER_MAXIMUM:103,NUMBER_MAXIMUM_EXCLUSIVE:104,STRING_LENGTH_SHORT:200,STRING_LENGTH_LONG:201,STRING_PATTERN:202,OBJECT_PROPERTIES_MINIMUM:300,OBJECT_PROPERTIES_MAXIMUM:301,OBJECT_REQUIRED:302,OBJECT_ADDITIONAL_PROPERTIES:303,OBJECT_DEPENDENCY_KEY:304,ARRAY_LENGTH_SHORT:400,ARRAY_LENGTH_LONG:401,ARRAY_UNIQUE:402,ARRAY_ADDITIONAL_ITEMS:403,FORMAT_CUSTOM:500,KEYWORD_CUSTOM:501,CIRCULAR_REFERENCE:600,UNKNOWN_PROPERTY:1e3},p={};for(var q in o)p[o[q]]=q;var r={INVALID_TYPE:"invalid type: {type} (expected {expected})",ENUM_MISMATCH:"No enum match for: {value}",ANY_OF_MISSING:'Data does not match any schemas from "anyOf"',ONE_OF_MISSING:'Data does not match any schemas from "oneOf"',ONE_OF_MULTIPLE:'Data is valid against more than one schema from "oneOf": indices {index1} and {index2}',NOT_PASSED:'Data matches schema from "not"',NUMBER_MULTIPLE_OF:"Value {value} is not a multiple of {multipleOf}",NUMBER_MINIMUM:"Value {value} is less than minimum {minimum}",NUMBER_MINIMUM_EXCLUSIVE:"Value {value} is equal to exclusive minimum {minimum}",NUMBER_MAXIMUM:"Value {value} is greater than maximum {maximum}",NUMBER_MAXIMUM_EXCLUSIVE:"Value {value} is equal to exclusive maximum {maximum}",STRING_LENGTH_SHORT:"String is too short ({length} chars), minimum {minimum}",STRING_LENGTH_LONG:"String is too long ({length} chars), maximum {maximum}",STRING_PATTERN:"String does not match pattern: {pattern}",OBJECT_PROPERTIES_MINIMUM:"Too few properties defined ({propertyCount}), minimum {minimum}",OBJECT_PROPERTIES_MAXIMUM:"Too many properties defined ({propertyCount}), maximum {maximum}",OBJECT_REQUIRED:"Missing required property: {key}",OBJECT_ADDITIONAL_PROPERTIES:"Additional properties not allowed",OBJECT_DEPENDENCY_KEY:"Dependency failed - key must exist: {missing} (due to key: {key})",ARRAY_LENGTH_SHORT:"Array is too short ({length}), minimum {minimum}",ARRAY_LENGTH_LONG:"Array is too long ({length}), maximum {maximum}",ARRAY_UNIQUE:"Array items are not unique (indices {match1} and {match2})",ARRAY_ADDITIONAL_ITEMS:"Additional items not allowed",FORMAT_CUSTOM:"Format validation failed ({message})",KEYWORD_CUSTOM:"Keyword failed: {key} ({message})",CIRCULAR_REFERENCE:"Circular $refs: {urls}",UNKNOWN_PROPERTY:"Unknown property (not in schema)"};i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.name="ValidationError",i.prototype.prefixWith=function(a,b){if(null!==a&&(a=a.replace(/~/g,"~0").replace(/\//g,"~1"),this.dataPath="/"+a+this.dataPath),null!==b&&(b=b.replace(/~/g,"~0").replace(/\//g,"~1"),this.schemaPath="/"+b+this.schemaPath),null!==this.subErrors)for(var c=0;c<this.subErrors.length;c++)this.subErrors[c].prefixWith(a,b);return this};var s={},t=k();return t.addLanguage("en-gb",r),t.tv4=t,t});
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>tv4.min.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_tv4_min_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tv4.min.js</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1420554776.02</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>940.7432.14728.61644</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1420554753.5</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1420554702.05</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
// pointer.js
function encodePointer(p) {
return encodeURI(escapePointer(p));
}
function escapePointer(p) {
return p.replace(/~/g, '~0').replace(/\//g, '~1');
}
// dereference.js
const schemaKeyword = {
additionalItems: true,
unevaluatedItems: true,
items: true,
contains: true,
additionalProperties: true,
unevaluatedProperties: true,
propertyNames: true,
not: true,
if: true,
then: true,
else: true
};
const schemaArrayKeyword = {
prefixItems: true,
items: true,
allOf: true,
anyOf: true,
oneOf: true
};
const schemaMapKeyword = {
$defs: true,
definitions: true,
properties: true,
patternProperties: true,
dependentSchemas: true
};
const ignoredKeyword = {
id: true,
$id: true,
$ref: true,
$schema: true,
$anchor: true,
$vocabulary: true,
$comment: true,
default: true,
enum: true,
const: true,
required: true,
type: true,
maximum: true,
minimum: true,
exclusiveMaximum: true,
exclusiveMinimum: true,
multipleOf: true,
maxLength: true,
minLength: true,
pattern: true,
format: true,
maxItems: true,
minItems: true,
uniqueItems: true,
maxProperties: true,
minProperties: true
};
let initialBaseURI = typeof self !== 'undefined' && self.location
?
new URL(self.location.origin + self.location.pathname + location.search)
: new URL('https://github.com/cfworker');
function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = '') {
if (schema && typeof schema === 'object' && !Array.isArray(schema)) {
const id = schema.$id || schema.id;
if (id) {
const url = new URL(id, baseURI.href);
if (url.hash.length > 1) {
lookup[url.href] = schema;
}
else {
url.hash = '';
if (basePointer === '') {
baseURI = url;
}
else {
dereference(schema, lookup, baseURI);
}
}
}
}
else if (schema !== true && schema !== false) {
return lookup;
}
const schemaURI = baseURI.href + (basePointer ? '#' + basePointer : '');
if (lookup[schemaURI] !== undefined) {
throw new Error(`Duplicate schema URI "${schemaURI}".`);
}
lookup[schemaURI] = schema;
if (schema === true || schema === false) {
return lookup;
}
if (schema.__absolute_uri__ === undefined) {
Object.defineProperty(schema, '__absolute_uri__', {
enumerable: false,
value: schemaURI
});
}
if (schema.$ref && schema.__absolute_ref__ === undefined) {
const url = new URL(schema.$ref, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, '__absolute_ref__', {
enumerable: false,
value: url.href
});
}
if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === undefined) {
const url = new URL(schema.$recursiveRef, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, '__absolute_recursive_ref__', {
enumerable: false,
value: url.href
});
}
if (schema.$anchor) {
const url = new URL('#' + schema.$anchor, baseURI.href);
lookup[url.href] = schema;
}
for (let key in schema) {
if (ignoredKeyword[key]) {
continue;
}
const keyBase = `${basePointer}/${encodePointer(key)}`;
const subSchema = schema[key];
if (Array.isArray(subSchema)) {
if (schemaArrayKeyword[key]) {
const length = subSchema.length;
for (let i = 0; i < length; i++) {
dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);
}
}
}
else if (schemaMapKeyword[key]) {
for (let subKey in subSchema) {
dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);
}
}
else {
dereference(subSchema, lookup, baseURI, keyBase);
}
}
return lookup;
}
// validator.js
// import { deepCompareStrict } from './deep-compare-strict.js';
function deepCompareStrict(a, b) {
const typeofa = typeof a;
if (typeofa !== typeof b) {
return false;
}
if (Array.isArray(a)) {
if (!Array.isArray(b)) {
return false;
}
const length = a.length;
if (length !== b.length) {
return false;
}
for (let i = 0; i < length; i++) {
if (!deepCompareStrict(a[i], b[i])) {
return false;
}
}
return true;
}
if (typeofa === 'object') {
if (!a || !b) {
return a === b;
}
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
const length = aKeys.length;
if (length !== bKeys.length) {
return false;
}
for (const k of aKeys) {
if (!deepCompareStrict(a[k], b[k])) {
return false;
}
}
return true;
}
return a === b;
}
// import { fastFormat } from './format.js';
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
const FASTDATE = /^\d\d\d\d-[0-1]\d-[0-3]\d$/;
const FASTTIME = /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i;
const FASTDATETIME = /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i;
const FASTURIREFERENCE = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;
const EMAIL = (input) => {
if (input[0] === '"')
return false;
const [name, host, ...rest] = input.split('@');
if (!name ||
!host ||
rest.length !== 0 ||
name.length > 64 ||
host.length > 253)
return false;
if (name[0] === '.' || name.endsWith('.') || name.includes('..'))
return false;
if (!/^[a-z0-9.-]+$/i.test(host) ||
!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name))
return false;
return host
.split('.')
.every(part => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part));
};
const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;
const DURATION = (input) => input.length > 1 &&
input.length < 80 &&
(/^P\d+([.,]\d+)?W$/.test(input) ||
(/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) &&
/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)));
function bind(r) {
return r.test.bind(r);
}
const fullFormat = {
date,
time: time.bind(undefined, false),
'date-time': date_time,
duration: DURATION,
uri,
'uri-reference': bind(URIREF),
'uri-template': bind(URITEMPLATE),
url: bind(URL_),
email: EMAIL,
hostname: bind(HOSTNAME),
ipv4: bind(IPV4),
ipv6: bind(IPV6),
regex: regex,
uuid: bind(UUID),
'json-pointer': bind(JSON_POINTER),
'json-pointer-uri-fragment': bind(JSON_POINTER_URI_FRAGMENT),
'relative-json-pointer': bind(RELATIVE_JSON_POINTER)
};
const fastFormat = {
...fullFormat,
date: bind(FASTDATE),
time: bind(FASTTIME),
'date-time': bind(FASTDATETIME),
'uri-reference': bind(FASTURIREFERENCE)
};
function isLeapYear(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function date(str) {
const matches = str.match(DATE);
if (!matches)
return false;
const year = +matches[1];
const month = +matches[2];
const day = +matches[3];
return (month >= 1 &&
month <= 12 &&
day >= 1 &&
day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]));
}
function time(full, str) {
const matches = str.match(TIME);
if (!matches)
return false;
const hour = +matches[1];
const minute = +matches[2];
const second = +matches[3];
const timeZone = !!matches[5];
return (((hour <= 23 && minute <= 59 && second <= 59) ||
(hour == 23 && minute == 59 && second == 60)) &&
(!full || timeZone));
}
const DATE_TIME_SEPARATOR = /t|\s/i;
function date_time(str) {
const dateTime = str.split(DATE_TIME_SEPARATOR);
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
}
const NOT_URI_FRAGMENT = /\/|:/;
const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
function uri(str) {
return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str);
}
const Z_ANCHOR = /[^\\]\\Z/;
function regex(str) {
if (Z_ANCHOR.test(str))
return false;
try {
new RegExp(str);
return true;
}
catch (e) {
return false;
}
}
//import { ucs2length } from './ucs2-length.js';
function ucs2length(s) {
let result = 0;
let length = s.length;
let index = 0;
let charCode;
while (index < length) {
result++;
charCode = s.charCodeAt(index++);
if (charCode >= 0xd800 && charCode <= 0xdbff && index < length) {
charCode = s.charCodeAt(index);
if ((charCode & 0xfc00) == 0xdc00) {
index++;
}
}
}
return result;
}
// validate.js
function validate(instance, schema, draft = '2019-09', lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = '#', schemaLocation = '#', evaluated = Object.create(null)) {
if (schema === true) {
return { valid: true, errors: [] };
}
if (schema === false) {
return {
valid: false,
errors: [
{
instanceLocation,
keyword: 'false',
keywordLocation: instanceLocation,
error: 'False boolean schema.'
}
]
};
}
const rawInstanceType = typeof instance;
let instanceType;
switch (rawInstanceType) {
case 'boolean':
case 'number':
case 'string':
instanceType = rawInstanceType;
break;
case 'object':
if (instance === null) {
instanceType = 'null';
}
else if (Array.isArray(instance)) {
instanceType = 'array';
}
else {
instanceType = 'object';
}
break;
default:
throw new Error(`Instances of "${rawInstanceType}" type are not supported.`);
}
const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema;
const errors = [];
if ($recursiveAnchor === true && recursiveAnchor === null) {
recursiveAnchor = schema;
}
if ($recursiveRef === '#') {
const refSchema = recursiveAnchor === null
? lookup[__absolute_recursive_ref__]
: recursiveAnchor;
const keywordLocation = `${schemaLocation}/$recursiveRef`;
const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: '$recursiveRef',
keywordLocation,
error: 'A subschema had errors.'
}, ...result.errors);
}
}
if ($ref !== undefined) {
const uri = __absolute_ref__ || $ref;
const refSchema = lookup[uri];
if (refSchema === undefined) {
let message = `Unresolved $ref "${$ref}".`;
if (__absolute_ref__ && __absolute_ref__ !== $ref) {
message += ` Absolute URI "${__absolute_ref__}".`;
}
message += `\nKnown schemas:\n- ${Object.keys(lookup).join('\n- ')}`;
throw new Error(message);
}
const keywordLocation = `${schemaLocation}/$ref`;
const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: '$ref',
keywordLocation,
error: 'A subschema had errors.'
}, ...result.errors);
}
if (draft === '4' || draft === '7') {
return { valid: errors.length === 0, errors };
}
}
if (Array.isArray($type)) {
let length = $type.length;
let valid = false;
for (let i = 0; i < length; i++) {
if (instanceType === $type[i] ||
($type[i] === 'integer' &&
instanceType === 'number' &&
instance % 1 === 0 &&
instance === instance)) {
valid = true;
break;
}
}
if (!valid) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type.join('", "')}".`
});
}
}
else if ($type === 'integer') {
if (instanceType !== 'number' || instance % 1 || instance !== instance) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
}
}
else if ($type !== undefined && instanceType !== $type) {
errors.push({
instanceLocation,
keyword: 'type',
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
}
if ($const !== undefined) {
if (instanceType === 'object' || instanceType === 'array') {
if (!deepCompareStrict(instance, $const)) {
errors.push({
instanceLocation,
keyword: 'const',
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
}
}
else if (instance !== $const) {
errors.push({
instanceLocation,
keyword: 'const',
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
}
}
if ($enum !== undefined) {
if (instanceType === 'object' || instanceType === 'array') {
if (!$enum.some(value => deepCompareStrict(instance, value))) {
errors.push({
instanceLocation,
keyword: 'enum',
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
}
}
else if (!$enum.some(value => instance === value)) {
errors.push({
instanceLocation,
keyword: 'enum',
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
}
}
if ($not !== undefined) {
const keywordLocation = `${schemaLocation}/not`;
const result = validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation);
if (result.valid) {
errors.push({
instanceLocation,
keyword: 'not',
keywordLocation,
error: 'Instance matched "not" schema.'
});
}
}
let subEvaluateds = [];
if ($anyOf !== undefined) {
const keywordLocation = `${schemaLocation}/anyOf`;
const errorsLength = errors.length;
let anyValid = false;
for (let i = 0; i < $anyOf.length; i++) {
const subSchema = $anyOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
anyValid = anyValid || result.valid;
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
}
if (anyValid) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'anyOf',
keywordLocation,
error: 'Instance does not match any subschemas.'
});
}
}
if ($allOf !== undefined) {
const keywordLocation = `${schemaLocation}/allOf`;
const errorsLength = errors.length;
let allValid = true;
for (let i = 0; i < $allOf.length; i++) {
const subSchema = $allOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
allValid = allValid && result.valid;
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
}
if (allValid) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'allOf',
keywordLocation,
error: `Instance does not match every subschema.`
});
}
}
if ($oneOf !== undefined) {
const keywordLocation = `${schemaLocation}/oneOf`;
const errorsLength = errors.length;
const matches = $oneOf.filter((subSchema, i) => {
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
if (result.valid) {
subEvaluateds.push(subEvaluated);
}
return result.valid;
}).length;
if (matches === 1) {
errors.length = errorsLength;
}
else {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'oneOf',
keywordLocation,
error: `Instance does not match exactly one subschema (${matches} matches).`
});
}
}
if (instanceType === 'object' || instanceType === 'array') {
Object.assign(evaluated, ...subEvaluateds);
}
if ($if !== undefined) {
const keywordLocation = `${schemaLocation}/if`;
const conditionResult = validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid;
if (conditionResult) {
if ($then !== undefined) {
const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated);
if (!thenResult.valid) {
errors.push({
instanceLocation,
keyword: 'if',
keywordLocation,
error: `Instance does not match "then" schema.`
}, ...thenResult.errors);
}
}
}
else if ($else !== undefined) {
const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated);
if (!elseResult.valid) {
errors.push({
instanceLocation,
keyword: 'if',
keywordLocation,
error: `Instance does not match "else" schema.`
}, ...elseResult.errors);
}
}
}
if (instanceType === 'object') {
if ($required !== undefined) {
for (const key of $required) {
if (!(key in instance)) {
errors.push({
instanceLocation,
keyword: 'required',
keywordLocation: `${schemaLocation}/required`,
// XXX expose key for make search of the field easier
key: key,
error: `Instance does not have required property "${key}".`
});
}
}
}
const keys = Object.keys(instance);
if ($minProperties !== undefined && keys.length < $minProperties) {
errors.push({
instanceLocation,
keyword: 'minProperties',
keywordLocation: `${schemaLocation}/minProperties`,
error: `Instance does not have at least ${$minProperties} properties.`
});
}
if ($maxProperties !== undefined && keys.length > $maxProperties) {
errors.push({
instanceLocation,
keyword: 'maxProperties',
keywordLocation: `${schemaLocation}/maxProperties`,
error: `Instance does not have at least ${$maxProperties} properties.`
});
}
if ($propertyNames !== undefined) {
const keywordLocation = `${schemaLocation}/propertyNames`;
for (const key in instance) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'propertyNames',
keywordLocation,
error: `Property name "${key}" does not match schema.`
}, ...result.errors);
}
}
}
if ($dependentRequired !== undefined) {
const keywordLocation = `${schemaLocation}/dependantRequired`;
for (const key in $dependentRequired) {
if (key in instance) {
const required = $dependentRequired[key];
for (const dependantKey of required) {
if (!(dependantKey in instance)) {
errors.push({
instanceLocation,
keyword: 'dependentRequired',
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
}
}
}
}
}
if ($dependentSchemas !== undefined) {
for (const key in $dependentSchemas) {
const keywordLocation = `${schemaLocation}/dependentSchemas`;
if (key in instance) {
const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'dependentSchemas',
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
}
}
if ($dependencies !== undefined) {
const keywordLocation = `${schemaLocation}/dependencies`;
for (const key in $dependencies) {
if (key in instance) {
const propsOrSchema = $dependencies[key];
if (Array.isArray(propsOrSchema)) {
for (const dependantKey of propsOrSchema) {
if (!(dependantKey in instance)) {
errors.push({
instanceLocation,
keyword: 'dependencies',
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
}
}
}
else {
const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`);
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'dependencies',
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
}
}
}
const thisEvaluated = Object.create(null);
let stop = false;
if ($properties !== undefined) {
const keywordLocation = `${schemaLocation}/properties`;
for (const key in $properties) {
if (!(key in instance)) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`);
if (result.valid) {
evaluated[key] = thisEvaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'properties',
keywordLocation,
error: `Property "${key}" does not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if (!stop && $patternProperties !== undefined) {
const keywordLocation = `${schemaLocation}/patternProperties`;
for (const pattern in $patternProperties) {
const regex = new RegExp(pattern);
const subSchema = $patternProperties[pattern];
for (const key in instance) {
if (!regex.test(key)) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`);
if (result.valid) {
evaluated[key] = thisEvaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'patternProperties',
keywordLocation,
error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.`
}, ...result.errors);
}
}
}
}
if (!stop && $additionalProperties !== undefined) {
const keywordLocation = `${schemaLocation}/additionalProperties`;
for (const key in instance) {
if (thisEvaluated[key]) {
continue;
}
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) {
evaluated[key] = true;
}
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'additionalProperties',
keywordLocation,
error: `Property "${key}" does not match additional properties schema.`
}, ...result.errors);
}
}
}
else if (!stop && $unevaluatedProperties !== undefined) {
const keywordLocation = `${schemaLocation}/unevaluatedProperties`;
for (const key in instance) {
if (!evaluated[key]) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) {
evaluated[key] = true;
}
else {
errors.push({
instanceLocation,
keyword: 'unevaluatedProperties',
keywordLocation,
error: `Property "${key}" does not match unevaluated properties schema.`
}, ...result.errors);
}
}
}
}
}
else if (instanceType === 'array') {
if ($maxItems !== undefined && instance.length > $maxItems) {
errors.push({
instanceLocation,
keyword: 'maxItems',
keywordLocation: `${schemaLocation}/maxItems`,
error: `Array has too many items (${instance.length} > ${$maxItems}).`
});
}
if ($minItems !== undefined && instance.length < $minItems) {
errors.push({
instanceLocation,
keyword: 'minItems',
keywordLocation: `${schemaLocation}/minItems`,
error: `Array has too few items (${instance.length} < ${$minItems}).`
});
}
const length = instance.length;
let i = 0;
let stop = false;
if ($prefixItems !== undefined) {
const keywordLocation = `${schemaLocation}/prefixItems`;
const length2 = Math.min($prefixItems.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'prefixItems',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if ($items !== undefined) {
const keywordLocation = `${schemaLocation}/items`;
if (Array.isArray($items)) {
const length2 = Math.min($items.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'items',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
else {
for (; i < length; i++) {
const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'items',
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop)
break;
}
}
}
if (!stop && $additionalItems !== undefined) {
const keywordLocation = `${schemaLocation}/additionalItems`;
for (; i < length; i++) {
const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: 'additionalItems',
keywordLocation,
error: `Items did not match additional items schema.`
}, ...result.errors);
}
}
}
}
if ($contains !== undefined) {
if (length === 0 && $minContains === undefined) {
errors.push({
instanceLocation,
keyword: 'contains',
keywordLocation: `${schemaLocation}/contains`,
error: `Array is empty. It must contain at least one item matching the schema.`
});
}
else if ($minContains !== undefined && length < $minContains) {
errors.push({
instanceLocation,
keyword: 'minContains',
keywordLocation: `${schemaLocation}/minContains`,
error: `Array has less items (${length}) than minContains (${$minContains}).`
});
}
else {
const keywordLocation = `${schemaLocation}/contains`;
const errorsLength = errors.length;
let contained = 0;
for (let j = 0; j < length; j++) {
const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation);
if (result.valid) {
evaluated[j] = true;
contained++;
}
else {
errors.push(...result.errors);
}
}
if (contained >= ($minContains || 0)) {
errors.length = errorsLength;
}
if ($minContains === undefined &&
$maxContains === undefined &&
contained === 0) {
errors.splice(errorsLength, 0, {
instanceLocation,
keyword: 'contains',
keywordLocation,
error: `Array does not contain item matching schema.`
});
}
else if ($minContains !== undefined && contained < $minContains) {
errors.push({
instanceLocation,
keyword: 'minContains',
keywordLocation: `${schemaLocation}/minContains`,
error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.`
});
}
else if ($maxContains !== undefined && contained > $maxContains) {
errors.push({
instanceLocation,
keyword: 'maxContains',
keywordLocation: `${schemaLocation}/maxContains`,
error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.`
});
}
}
}
if (!stop && $unevaluatedItems !== undefined) {
const keywordLocation = `${schemaLocation}/unevaluatedItems`;
for (i; i < length; i++) {
if (evaluated[i]) {
continue;
}
const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
errors.push({
instanceLocation,
keyword: 'unevaluatedItems',
keywordLocation,
error: `Items did not match unevaluated items schema.`
}, ...result.errors);
}
}
}
if ($uniqueItems) {
for (let j = 0; j < length; j++) {
const a = instance[j];
const ao = typeof a === 'object' && a !== null;
for (let k = 0; k < length; k++) {
if (j === k) {
continue;
}
const b = instance[k];
const bo = typeof b === 'object' && b !== null;
if (a === b || (ao && bo && deepCompareStrict(a, b))) {
errors.push({
instanceLocation,
keyword: 'uniqueItems',
keywordLocation: `${schemaLocation}/uniqueItems`,
error: `Duplicate items at indexes ${j} and ${k}.`
});
j = Number.MAX_SAFE_INTEGER;
k = Number.MAX_SAFE_INTEGER;
}
}
}
}
}
else if (instanceType === 'number') {
if (draft === '4') {
if ($minimum !== undefined &&
(($exclusiveMinimum === true && instance <= $minimum) ||
instance < $minimum)) {
errors.push({
instanceLocation,
keyword: 'minimum',
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$exclusiveMinimum ? 'or equal to ' : ''} ${$minimum}.`
});
}
if ($maximum !== undefined &&
(($exclusiveMaximum === true && instance >= $maximum) ||
instance > $maximum)) {
errors.push({
instanceLocation,
keyword: 'maximum',
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$exclusiveMaximum ? 'or equal to ' : ''} ${$maximum}.`
});
}
}
else {
if ($minimum !== undefined && instance < $minimum) {
errors.push({
instanceLocation,
keyword: 'minimum',
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$minimum}.`
});
}
if ($maximum !== undefined && instance > $maximum) {
errors.push({
instanceLocation,
keyword: 'maximum',
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$maximum}.`
});
}
if ($exclusiveMinimum !== undefined && instance <= $exclusiveMinimum) {
errors.push({
instanceLocation,
keyword: 'exclusiveMinimum',
keywordLocation: `${schemaLocation}/exclusiveMinimum`,
error: `${instance} is less than ${$exclusiveMinimum}.`
});
}
if ($exclusiveMaximum !== undefined && instance >= $exclusiveMaximum) {
errors.push({
instanceLocation,
keyword: 'exclusiveMaximum',
keywordLocation: `${schemaLocation}/exclusiveMaximum`,
error: `${instance} is greater than or equal to ${$exclusiveMaximum}.`
});
}
}
if ($multipleOf !== undefined) {
const remainder = instance % $multipleOf;
if (Math.abs(0 - remainder) >= 1.1920929e-7 &&
Math.abs($multipleOf - remainder) >= 1.1920929e-7) {
errors.push({
instanceLocation,
keyword: 'multipleOf',
keywordLocation: `${schemaLocation}/multipleOf`,
error: `${instance} is not a multiple of ${$multipleOf}.`
});
}
}
}
else if (instanceType === 'string') {
const length = $minLength === undefined && $maxLength === undefined
? 0
: ucs2length(instance);
if ($minLength !== undefined && length < $minLength) {
errors.push({
instanceLocation,
keyword: 'minLength',
keywordLocation: `${schemaLocation}/minLength`,
error: `String is too short (${length} < ${$minLength}).`
});
}
if ($maxLength !== undefined && length > $maxLength) {
errors.push({
instanceLocation,
keyword: 'maxLength',
keywordLocation: `${schemaLocation}/maxLength`,
error: `String is too long (${length} > ${$maxLength}).`
});
}
if ($pattern !== undefined && !new RegExp($pattern).test(instance)) {
errors.push({
instanceLocation,
keyword: 'pattern',
keywordLocation: `${schemaLocation}/pattern`,
error: `String does not match pattern.`
});
}
if ($format !== undefined &&
fastFormat[$format] &&
!fastFormat[$format](instance)) {
errors.push({
instanceLocation,
keyword: 'format',
keywordLocation: `${schemaLocation}/format`,
error: `String does not match format "${$format}".`
});
}
}
return { valid: errors.length === 0, errors };
}
// validator.js
class Validator {
constructor(schema, draft = '2019-09', shortCircuit = true) {
this.schema = schema;
this.draft = draft;
this.shortCircuit = shortCircuit;
this.lookup = dereference(schema);
}
validate(instance) {
return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit);
}
addSchema(schema, id) {
if (id) {
schema = { ...schema, $id: id };
}
dereference(schema, this.lookup);
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>cfworker-jsonschema-validator.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>validator.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>ref-parser.min.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>minimal_dual_type</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo under json-in-xml",
"properties": {
"simple-string-in-json": {
"title": "Another string on JSON",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-integer-in-json": {
"title": "Another Integer on JSON",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
}
}
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-json-in-xml-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo",
"properties": {
"simple-string": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"name": "Simple Demo",
"description": "Demo Simple",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default reference parameters",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
},
"jsondefault": {
"title": "JSON in XML",
"serialisation": "json-in-xml",
"description": "Default reference parameters under json-in-xml",
"request": "instance-input-json-in-xml-schema.json",
"response": "instance-output-schema.json",
"index": 1
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>minimal_json_in_xml_demo</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo",
"properties": {
"simple-string": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-string-with-enum": {
"title": "Example of Simple String with enum",
"description": "Example of Simple String with enum",
"type": "string",
"enum" : [
"simple string A",
"simple string B",
"simple string C"
],
"default": "simple string A"
},
"simple-boolean": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "boolean",
"default": true
},
"simple-string-with-text-area": {
"title": "Example of Simple String with textarea",
"description": "Example of Simple String with text area",
"type": "string",
"default": "Simple string",
"textarea": true
},
"simple-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
},
"simple-integer-with-enum": {
"title": "Example of Simple Integer with enum",
"description": "Example of Simple Integer with enum",
"type": "integer",
"default": 1,
"enum": [
1,
2,
3,
5,
7,
11,
13,
17
]
},
"simple-numeric-integer": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0
},
"simple-numeric-integer-enum": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0,
"enum": [
1.0,
2.0,
3.0,
5.0,
7.0,
11.0,
13.0,
17.0
]
},
"simple-numeric-float": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5
},
"simple-numeric-float-enum": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5,
"enum": [
0.25,
0.75,
1.25,
1.5
]
},
"simple-array-of-string": {
"title": "Example of Simple array of String",
"description": "Example of Array of String",
"type": "array",
"items": {"type": "string"}
},
"simple-array-of-integer": {
"title": "Example of Simple array of Integer",
"description": "Example of Array of Interger",
"type": "array",
"items": {"type": "integer"}
},
"simple-array-of-number": {
"title": "Example of Simple array of Numbers",
"description": "Example of Array of Numbers",
"type": "array",
"items": {"type": "number"}
},
"simple-object": {
"title": "Example of Single Object",
"description": "Example of Single Object",
"type": "object",
"properties": {
"sample-object-string": {
"title": "Example of Simple String on an object",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-object-with-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
},
"simple-object-with-integer-with-enum": {
"title": "Example of Simple Integer with enum",
"description": "Example of Simple Integer with enum",
"type": "integer",
"default": 1,
"enum": [
1,
2
]
}
}
},
"simple-object-dict": {
"title": "Example of multi objects as a Dict",
"description": "Example of multi objects as a Dict",
"type": "object",
"patternProperties": {
".*": {
"properties": {
"simple-object-dict-string-example": {
"title": "Example of the String as part of Object",
"description": "Example of the String as part of Object",
"type": "string",
"default": ""
},
"simple-object-dict-string-with-enum": {
"title": "Example of the String as part of Object with Enum",
"description": "Example of the String as part of Object with Enum",
"type": "string",
"default": "String Sample A",
"enum": [
"String Sample A",
"String Sample B"
]
}
}
}
}
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"name": "Simple Demo",
"description": "Demo Simple",
"serialisation": "json-in-xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default reference parameters",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>minimal_xml_demo</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo with required",
"required": [
"simple-string",
"simple-string-with-enum",
"simple-boolean",
"simple-string-with-text-area",
"simple-integer",
"simple-integer-with-enum",
"simple-numeric-integer",
"simple-numeric-integer-enum",
"simple-numeric-float",
"simple-numeric-float-enum"
],
"properties": {
"simple-string": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-string-with-enum": {
"title": "Example of Simple String with enum",
"description": "Example of Simple String with enum",
"type": "string",
"enum" : [
"simple string A",
"simple string B",
"simple string C"
],
"default": "simple string A"
},
"simple-boolean": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "boolean",
"default": true
},
"simple-string-with-text-area": {
"title": "Example of Simple String with textarea",
"description": "Example of Simple String with text area",
"type": "string",
"default": "Simple string",
"textarea": true
},
"simple-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
},
"simple-integer-with-enum": {
"title": "Example of Simple Integer with enum",
"description": "Example of Simple Integer with enum",
"type": "integer",
"default": 1,
"enum": [
1,
2,
3,
5,
7,
11,
13,
17
]
},
"simple-numeric-integer": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0
},
"simple-numeric-integer-enum": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0,
"enum": [
1.0,
2.0,
3.0,
5.0,
7.0,
11.0,
13.0,
17.0
]
},
"simple-numeric-float": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5
},
"simple-numeric-float-enum": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5,
"enum": [
0.25,
0.75,
1.25,
1.5
]
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-schema-required.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo",
"properties": {
"simple-string": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
},
"simple-string-with-enum": {
"title": "Example of Simple String with enum",
"description": "Example of Simple String with enum",
"type": "string",
"enum" : [
"simple string A",
"simple string B",
"simple string C"
],
"default": "simple string A"
},
"simple-boolean": {
"title": "Example of Simple String",
"description": "Example of Simple String",
"type": "boolean",
"default": true
},
"simple-string-with-text-area": {
"title": "Example of Simple String with textarea",
"description": "Example of Simple String with text area",
"type": "string",
"default": "Simple string",
"textarea": true
},
"simple-integer": {
"title": "Example of Simple Integer",
"description": "Example of Simple Integer",
"type": "integer",
"default": 1
},
"simple-integer-with-enum": {
"title": "Example of Simple Integer with enum",
"description": "Example of Simple Integer with enum",
"type": "integer",
"default": 1,
"enum": [
1,
2,
3,
5,
7,
11,
13,
17
]
},
"simple-numeric-integer": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0
},
"simple-numeric-integer-enum": {
"title": "Example of Simple Numeric as integer",
"description": "Example of Simple Numeric as Interger",
"type": "number",
"default": 1.0,
"enum": [
1.0,
2.0,
3.0,
5.0,
7.0,
11.0,
13.0,
17.0
]
},
"simple-numeric-float": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5
},
"simple-numeric-float-enum": {
"title": "Example of Simple Numeric as float",
"description": "Example of Simple Numeric as float",
"type": "number",
"default": 1.5,
"enum": [
0.25,
0.75,
1.25,
1.5
]
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>instance-input-schema.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"name": "Simple Demo",
"description": "Demo Simple",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"description": "Default reference parameters",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
},
"default-required": {
"title": "Required Example",
"description": "Default reference parameters with required",
"request": "instance-input-schema-required.json",
"response": "instance-output-schema.json",
"index": 0
}
}
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>software.cfg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/plain</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Extend simple parameter extension with extra only supported on json-in-xml",
"additionalProperties": false,
"required": ["simple-object-is-required"],
"allOf": [
{
"$ref": "instance-input-schema.json#/"
"$ref": "instance-input-schema.json#"
},
{
"properties": {
......@@ -56,6 +56,33 @@
}
}
},
"simple-object-with-required": {
"title": "Example of Single Object",
"description": "Example of Single Object",
"type": "object",
"required": ["sample-object-string"],
"properties": {
"sample-object-string": {
"title": "Example of Simple String on an object",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string"
}
}
},
"simple-object-is-required": {
"title": "Example of Single Object",
"description": "Example of Single Object",
"type": "object",
"properties": {
"sample-object-string": {
"title": "Example of Simple String on an object",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string "
}
}
},
"simple-object-dict": {
"title": "Example of multi objects as a Dict",
"description": "Example of multi objects as a Dict",
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Sample paremeters for a Simple Demo",
"additionalProperties": false,
"required": [
"simple-string-required",
"simple-string-with-enum-required"
],
"properties": {
"simple-string": {
"title": "Example of Simple String",
......@@ -21,6 +24,23 @@
],
"default": "simple string A"
},
"simple-string-required": {
"title": "Example of Simple String Required",
"description": "Example of Simple String",
"type": "string",
"default": "Simple string Required"
},
"simple-string-with-enum-required": {
"title": "Example of Simple String with enum",
"description": "Example of Simple String with enum",
"type": "string",
"enum" : [
"required string A",
"required string B",
"required string C"
],
"default": "required string A"
},
"simple-boolean": {
"title": "Example of Simple String",
"description": "Example of Simple String",
......
......@@ -194,7 +194,6 @@ web_page_module/rjs_slapos_load_software_schema_json
web_page_module/rjs_gadget_slapos_login_page_css
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_test_parameter_form_html
web_page_module/rjs_tv4_min_js
web_page_module/rjs_vkbeautify_js
web_site_module/hostingjs
web_site_module/hostingjs/**
\ No newline at end of file
......@@ -198,7 +198,6 @@ web_page_module/rjs_slapos_load_meta_schema_json
web_page_module/rjs_slapos_load_meta_schema_xml_in_json_json
web_page_module/rjs_slapos_load_meta_schema_xml_json
web_page_module/rjs_slapos_load_software_schema_json
web_page_module/rjs_tv4_min_js
web_page_module/rjs_vkbeautify_js
web_site_module/hostingjs
web_site_module/hostingjs/**
\ No newline at end of file
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test SlapOS JS UI Sevice JSON Serialisation </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">TTest SlapOS JS UI Sevice JSON Serialisation</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block define="menu_action python: 'Add'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tr>
<td colspan="3"><b> Request a Software </b></td>
</tr>
<tal:block define="software_product python: 'KVM'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/select_software_product" />
</tal:block>
<tal:block define="software_release python: 'KVM'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/select_software_release" />
</tal:block>
<tr>
<td colspan="3"><b> Fill Request form </b></td>
</tr>
<tal:block tal:define="header python: '3/3 Request Service: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'KVM'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;instance/&gt;</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;ram-size&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//ram-size"]</td>
<td>1024</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Cluster"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Cluster"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td>Cluster</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;ram-size&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//summary[text()="More information..."]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//summary[text()="More information..."]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;instance&gt;&lt;parameter id=&quot;_&quot;&gt;{&quot;kvm-partition-dict&quot;: {&quot;T&quot;: {&quot;ram-size&quot;: 2048}}}&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New service created.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0"]</td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0'})">
<td>waitForElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0'})">
<td>assertElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//kvm-partition-dict/T/ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//kvm-partition-dict/T/ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//kvm-partition-dict/T/ram-size"]</td>
<td>2048</td>
</tr>
<tr>
<td>pause</td>
<td>1000</td>
<td>2000</td>
</tr>
<tal:block define="menu_action python: 'Destroy'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Destroy Instance Tree: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-INVALID-PARAMETER 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Destroyed.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test SlapOS JS UI Sevice JSON Serialisation </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">TTest SlapOS JS UI Sevice JSON Serialisation</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block define="menu_action python: 'Add'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tr>
<td colspan="3"><b> Request a Software </b></td>
</tr>
<tal:block define="software_product python: 'KVM'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/select_software_product" />
</tal:block>
<tal:block define="software_release python: 'KVM'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/select_software_release" />
</tal:block>
<tr>
<td colspan="3"><b> Fill Request form </b></td>
</tr>
<tal:block tal:define="header python: '3/3 Request Service: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'KVM'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;instance/&gt;</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;ram-size&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//ram-size"]</td>
<td>1024</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New service created.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0'})">
<td>waitForElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0'})">
<td>assertElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//ram-size"]</td>
<td>1024</td>
</tr>
<tr>
<td>pause</td>
<td>1000</td>
<td>2000</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_save" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data updated.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0"]</td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0'})">
<td>waitForElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr tal:define="dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0'})">
<td>assertElementPresent</td>
<td tal:content="python: '//a[@data-i18n= \'%s\']' % (here.Base_translateString('Instance Tree: ${title}', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//ram-size"]</td>
<td>1024</td>
</tr>
<tal:block define="menu_action python: 'Destroy'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block tal:define="header python: 'Destroy Instance Tree: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-SERVICE-KVM-LOAD-PARAMETER 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is Destroyed.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSServiceInvalidParameter</string> </value>
<value> <string>testSlapOSJSTestParameterEditorAllOf</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (AllOf) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (AllOf)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/simpledemo/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/select_software_type_json_in_xml" />
<tr>
<td>waitForElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the string + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td>simple string B</td>
</tr>
<tr>
<td colspan="3"><b> Fill the boolean</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-boolean"]</td>
<td>true</td>
</tr>
<tr>
<td colspan="3"><b> Fill the String on Text area</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td>this is a simple string on a text area</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td colspan="3"><b> Fill the integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td>7</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td>13</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (float)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number" and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric float + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td>1.25</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string on an object</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td>this is a simple string on an object</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer) on an object</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td>99</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Add one object </b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td>Example of Simple object</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td>This an example of a string on an object</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td>String Sample A</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZ</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInNpbXBsZS1zdHJpbmciOiAidGhpcyBpcyBhIHNpbXBsZSBzdHJpbmciLAogICAgInNpbXBsZS1zdHJpbmctd2l0aC1lbnVtIjogInNpbXBsZSBzdHJpbmcgQiIsCiAgICAic2ltcGxlLWJvb2xlYW4iOiB0cnVlLAogICAgInNpbXBsZS1zdHJpbmctd2l0aC10ZXh0LWFyZWEiOiAidGhpcyBpcyBhIHNpbXBsZSBzdHJpbmcgb24gYSB0ZXh0IGFyZWEiLAogICAgInNpbXBsZS1pbnRlZ2VyIjogMSwKICAgICJzaW1wbGUtaW50ZWdlci13aXRoLWVudW0iOiA3LAogICAgInNpbXBsZS1udW1lcmljLWludGVnZXIiOiAyLAogICAgInNpbXBsZS1udW1lcmljLWludGVnZXItZW51bSI6IDEzLAogICAgInNpbXBsZS1udW1lcmljLWZsb2F0IjogMiwKICAgICJzaW1wbGUtbnVtZXJpYy1mbG9hdC1lbnVtIjogMS4yNSwKICAgICJzaW1wbGUtb2JqZWN0IjogewogICAgICAgICJzYW1wbGUtb2JqZWN0LXN0cmluZyI6ICJ0aGlzIGlzIGEgc2ltcGxlIHN0cmluZyBvbiBhbiBvYmplY3QiLAogICAgICAgICJzaW1wbGUtb2JqZWN0LXdpdGgtaW50ZWdlciI6IDk5LAogICAgICAgICJzaW1wbGUtb2JqZWN0LXdpdGgtaW50ZWdlci13aXRoLWVudW0iOiAyCiAgICB9LAogICAgInNpbXBsZS1vYmplY3QtZGljdCI6IHsKICAgICAgICAiRXhhbXBsZSBvZiBTaW1wbGUgb2JqZWN0IjogewogICAgICAgICAgICAic2ltcGxlLW9iamVjdC1kaWN0LXN0cmluZy1leGFtcGxlIjogIlRoaXMgYW4gZXhhbXBsZSBvZiBhIHN0cmluZyBvbiBhbiBvYmplY3QiLAogICAgICAgICAgICAic2ltcGxlLW9iamVjdC1kaWN0LXN0cmluZy13aXRoLWVudW0iOiAiU3RyaW5nIFNhbXBsZSBBIgogICAgICAgIH0KICAgIH0KfTwvcGFyYW1ldGVyPgo8L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorChangeSerialisation</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor Change Serialisation </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Change Serialisation)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_dual_type/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/select_software_type_json_in_xml" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Change back Software type</b></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>Default</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>JSON in XML</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer-in-json" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer-in-json" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer-in-json" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>Default</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter values should NOT contains _ parameter (xml)."]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter values should NOT contains _ parameter (xml)."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZ</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLXN0cmluZyI+dGhpcyBpcyBhIHNpbXBsZSBzdHJpbmc8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1pbnRlZ2VyIj4xPC9wYXJhbWV0ZXI+CjwvaW5zdGFuY2U+</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorInvalidParameter</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor Change Serialisation </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Change Serialisation)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_dual_type/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_raw_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '&lt;instance/&gt;')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '&lt;instance/&gt;')]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;simple-string&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_form_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>1024</td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>JSON in XML</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;simple-string&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_form_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="error"]//span[@class="error_msg" and text() = "Error: The current parameter should contains only _ parameter (json-in-xml)."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;simple-string&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>pause</td>
<td>500</td>
<td>500</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;instance&gt;&lt;parameter id=&quot;_&quot;&gt;{&quot;simple-string-in-json&quot;: &quot;1024&quot;}&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;instance&gt;&lt;parameter id=&quot;_&quot;&gt;{&quot;simple-string-in-json&quot;: &quot;1024&quot;}&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_form_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>//input[@name="//simple-string-in-json" and @type="text"]</td>
<td>1024</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZ</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInNpbXBsZS1zdHJpbmctaW4tanNvbiI6ICIxMDI0Igp9PC9wYXJhbWV0ZXI+CjwvaW5zdGFuY2U+</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorJSONinXML</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (XML Serialisation) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (XML Serialisation)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_json_in_xml_demo/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the string + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td>simple string B</td>
</tr>
<tr>
<td colspan="3"><b> Fill the boolean</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-boolean"]</td>
<td>true</td>
</tr>
<tr>
<td colspan="3"><b> Fill the String on Text area</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td>this is a simple string on a text area</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td colspan="3"><b> Fill the integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td>7</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td>13</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (float)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number" and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric float + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td>1.25</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string on an object</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object/sample-object-string" and @type="text"]</td>
<td>this is a simple string on an object</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer) on an object</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object/simple-object-with-integer" and @type="number"]</td>
<td>99</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-object/simple-object-with-integer-with-enum"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Add one object </b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="ADD//simple-object-dict"]</td>
<td>Example of Simple object</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="//simple-object-dict"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-example"]</td>
<td>This an example of a string on an object</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-object-dict/Example of Simple object/simple-object-dict-string-with-enum"]</td>
<td>String Sample A</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZ</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInNpbXBsZS1zdHJpbmciOiAidGhpcyBpcyBhIHNpbXBsZSBzdHJpbmciLAogICAgInNpbXBsZS1zdHJpbmctd2l0aC1lbnVtIjogInNpbXBsZSBzdHJpbmcgQiIsCiAgICAic2ltcGxlLWJvb2xlYW4iOiB0cnVlLAogICAgInNpbXBsZS1zdHJpbmctd2l0aC10ZXh0LWFyZWEiOiAidGhpcyBpcyBhIHNpbXBsZSBzdHJpbmcgb24gYSB0ZXh0IGFyZWEiLAogICAgInNpbXBsZS1pbnRlZ2VyIjogMSwKICAgICJzaW1wbGUtaW50ZWdlci13aXRoLWVudW0iOiA3LAogICAgInNpbXBsZS1udW1lcmljLWludGVnZXIiOiAyLAogICAgInNpbXBsZS1udW1lcmljLWludGVnZXItZW51bSI6IDEzLAogICAgInNpbXBsZS1udW1lcmljLWZsb2F0IjogMiwKICAgICJzaW1wbGUtbnVtZXJpYy1mbG9hdC1lbnVtIjogMS4yNSwKICAgICJzaW1wbGUtb2JqZWN0IjogewogICAgICAgICJzYW1wbGUtb2JqZWN0LXN0cmluZyI6ICJ0aGlzIGlzIGEgc2ltcGxlIHN0cmluZyBvbiBhbiBvYmplY3QiLAogICAgICAgICJzaW1wbGUtb2JqZWN0LXdpdGgtaW50ZWdlciI6IDk5LAogICAgICAgICJzaW1wbGUtb2JqZWN0LXdpdGgtaW50ZWdlci13aXRoLWVudW0iOiAyCiAgICB9LAogICAgInNpbXBsZS1vYmplY3QtZGljdCI6IHsKICAgICAgICAiRXhhbXBsZSBvZiBTaW1wbGUgb2JqZWN0IjogewogICAgICAgICAgICAic2ltcGxlLW9iamVjdC1kaWN0LXN0cmluZy1leGFtcGxlIjogIlRoaXMgYW4gZXhhbXBsZSBvZiBhIHN0cmluZyBvbiBhbiBvYmplY3QiLAogICAgICAgICAgICAic2ltcGxlLW9iamVjdC1kaWN0LXN0cmluZy13aXRoLWVudW0iOiAiU3RyaW5nIFNhbXBsZSBBIgogICAgICAgIH0KICAgIH0KfTwvcGFyYW1ldGVyPgo8L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorKVMDefault</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (AllOf) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (AllOf)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/kvm/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td colspan="3"><b> Fill the ram size</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//ram-size" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//ram-size" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//ram-size" and @type="number"]</td>
<td>4097</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = '4097 is not a multiple of 512.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = '4097 is not a multiple of 512.']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//ram-size" and @type="number"]</td>
<td>4096</td>
</tr>
<tr>
<td>fireEvent</td>
<td>//input[@name="//ram-size" and @type="number"]</td>
<td>change</td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//span[@class="error" and text() = '4096 is not a multiple of 512.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//span[@class="error" and text() = '4096 is not a multiple of 512.']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Fill ram size</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//cpu-count" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//cpu-count" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//cpu-count" and @type="number"]</td>
<td>-1</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = '-1 is less than 1.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = '-1 is less than 1.']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//cpu-count" and @type="number"]</td>
<td>3</td>
</tr>
<tr>
<td>fireEvent</td>
<td>//input[@name="//cpu-count" and @type="number"]</td>
<td>change</td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//span[@class="error" and text() = '-1 is less than 1.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//span[@class="error" and text() = '-1 is less than 1.']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiP</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInJhbS1zaXplIjogNDA5NiwKICAgICJjcHUtY291bnQiOiAzCn08L3BhcmFtZXRlcj4KPC9pbnN0YW5jZT4=</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD1900eNB</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd1900.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_rx_tx_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD1900gNBEPCSimCard</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd1900.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_gnb_sim_card_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD2600eNB</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd2600.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_rx_tx_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD2600gNBEPCSimCard</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd2600.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_gnb_sim_card_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD3500eNB</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd3500.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_rx_tx_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD3500gNBEPCSimCard</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd3500.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_gnb_sim_card_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD3700eNB</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd3700.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_rx_tx_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorORSAmarisoftTD3700gNBEPCSimCard</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.286/software/ors-amarisoft/software-tdd3700.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSORSParameterCommonTemplate/macros/basic_gnb_sim_card_scenario" />
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorPostRawJSON</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor Change Serialisation </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Change Serialisation)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_json_in_xml_demo/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_raw_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '{}')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '{}')]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>500</td>
<td>500</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;instance&gt;&lt;parameter id=&quot;_&quot;&gt;{&quot;simple-string-in-json&quot;: &quot;1024&quot;}&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;instance&gt;&lt;parameter id=&quot;_&quot;&gt;{&quot;simple-string-in-json&quot;: &quot;1024&quot;}&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZ</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48aW5zdGFuY2U+PHBhcmFtZXRlciBpZD0iXyI+eyJzaW1wbGUtc3RyaW5nLWluLWpzb24iOiAiMTAyNCJ9PC9wYXJhbWV0ZXI+PC9pbnN0YW5jZT4=</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorPostRawXML</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor Post Raw Parameter </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Post Raw Parameter)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_dual_type/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/show_raw_parameter" />
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '&lt;instance/&gt;')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content" and contains(text(), '&lt;instance/&gt;')]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="text_content"]</td>
<td>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;instance&gt;&lt;parameter id=&quot;simple-string&quot;&gt;1024&lt;/parameter&gt;&lt;/instance&gt;</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVV</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+PGluc3RhbmNlPjxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1zdHJpbmciPjEwMjQ8L3BhcmFtZXRlcj48L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorTheiaDefault</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (Theia Simpler Test) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (Theia Simpler Test)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td colspan="3"><b> Fill the ram size</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//autorun"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//autorun"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//autorun"]</td>
<td>running</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiP</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iYXV0b3J1biI+cnVubmluZzwvcGFyYW1ldGVyPgo8L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSServiceLoadParameter</string> </value>
<value> <string>testSlapOSJSTestParameterEditorXML</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (XML Serialisation) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (XML Serialisation)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_xml_demo/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection_default" />
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the string + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td>simple string B</td>
</tr>
<tr>
<td colspan="3"><b> Fill the boolean</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-boolean"]</td>
<td>true</td>
</tr>
<tr>
<td colspan="3"><b> Fill the String on Text area</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td>this is a simple string on a text area</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td colspan="3"><b> Fill the integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td>7</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td>13</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (float)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number" and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric float + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td>1.25</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciB</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLXN0cmluZyI+dGhpcyBpcyBhIHNpbXBsZSBzdHJpbmc8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1zdHJpbmctd2l0aC1lbnVtIj5zaW1wbGUgc3RyaW5nIEI8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1ib29sZWFuIj50cnVlPC9wYXJhbWV0ZXI+CiAgICA8cGFyYW1ldGVyIGlkPSJzaW1wbGUtc3RyaW5nLXdpdGgtdGV4dC1hcmVhIj50aGlzIGlzIGEgc2ltcGxlIHN0cmluZyBvbiBhIHRleHQgYXJlYTwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLWludGVnZXIiPjE8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1pbnRlZ2VyLXdpdGgtZW51bSI+NzwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtaW50ZWdlciI+MjwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtaW50ZWdlci1lbnVtIj4xMzwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtZmxvYXQiPjI8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1udW1lcmljLWZsb2F0LWVudW0iPjEuMjU8L3BhcmFtZXRlcj4KPC9pbnN0YW5jZT4=
</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSTestParameterEditorXMLRequired</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Parameter editor (XML Serialisation with Required) </title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test Parameter editor (XML Serialisation with Required)</td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/init" />
<tr>
<td colspan="3"><b> Set URL for the software release </b></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='url_string']</td>
<td>${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_xml_demo/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Required Example"]
</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Required Example"]
</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td>Required Example</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>x</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td>simple string B</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>fireEvent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>change</td>
</tr>
<tr>
<td colspan="3"><b> Assert Error Messages</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string-with-enum".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string-with-enum".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-boolean".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-boolean".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string-with-text-area".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-string-with-text-area".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-integer".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-integer".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-integer-with-enum".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-integer-with-enum".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-integer".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-integer".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-integer-enum".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-integer-enum".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-float".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-float".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-float-enum".']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "simple-numeric-float-enum".']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple string</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-string" and @type="text"]</td>
<td>this is a simple string</td>
</tr>
<tr>
<td colspan="3"><b> Fill the string + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-string-with-enum"]</td>
<td>simple string B</td>
</tr>
<tr>
<td colspan="3"><b> Fill the boolean</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-boolean"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-boolean"]</td>
<td>true</td>
</tr>
<tr>
<td colspan="3"><b> Fill the String on Text area</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="//simple-string-with-text-area"]</td>
<td>this is a simple string on a text area</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple integer</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-integer" and @type="number"]</td>
<td>1</td>
</tr>
<tr>
<td colspan="3"><b> Fill the integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-integer-with-enum"]</td>
<td>7</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (integer)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-integer" and @type="number"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric integer + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-integer-enum"]</td>
<td>13</td>
</tr>
<tr>
<td colspan="3"><b> Fill the simple numeric (float)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number" and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//simple-numeric-float" and @type="number"and @step="any"]</td>
<td>2</td>
</tr>
<tr>
<td colspan="3"><b> Fill the numeric float + enum</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="//simple-numeric-float-enum"]</td>
<td>1.25</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciB</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLXN0cmluZyI+dGhpcyBpcyBhIHNpbXBsZSBzdHJpbmc8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1zdHJpbmctd2l0aC1lbnVtIj5zaW1wbGUgc3RyaW5nIEI8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1ib29sZWFuIj50cnVlPC9wYXJhbWV0ZXI+CiAgICA8cGFyYW1ldGVyIGlkPSJzaW1wbGUtc3RyaW5nLXdpdGgtdGV4dC1hcmVhIj50aGlzIGlzIGEgc2ltcGxlIHN0cmluZyBvbiBhIHRleHQgYXJlYTwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLWludGVnZXIiPjE8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1pbnRlZ2VyLXdpdGgtZW51bSI+NzwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtaW50ZWdlciI+MjwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtaW50ZWdlci1lbnVtIj4xMzwvcGFyYW1ldGVyPgogICAgPHBhcmFtZXRlciBpZD0ic2ltcGxlLW51bWVyaWMtZmxvYXQiPjI8L3BhcmFtZXRlcj4KICAgIDxwYXJhbWV0ZXIgaWQ9InNpbXBsZS1udW1lcmljLWZsb2F0LWVudW0iPjEuMjU8L3BhcmFtZXRlcj4KPC9pbnN0YW5jZT4=
</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
# PreferenceTool
from DateTime import DateTime
software_version = "1.0.289"
portal = context.getPortalObject()
preference = portal.portal_preferences.getActiveSystemPreference()
......@@ -39,46 +41,46 @@ except KeyError:
)
kvm_software_release.edit(
url_string="https://lab.nexedi.com/nexedi/slapos/raw/1.0.164/software/kvm/software.cfg",
url_string="https://lab.nexedi.com/nexedi/slapos/raw/%s/software/kvm/software.cfg" % software_version,
)
if kvm_software_release.getValidationState() == "draft":
kvm_software_release.publishAlive()
try:
slaprunner_product = context.software_product_module["slaprunner"]
theia_product = context.software_product_module["theia"]
except KeyError:
slaprunner_product = context.software_product_module.newContent(
id="slaprunner",
title="Webrunner",
theia_product = context.software_product_module.newContent(
id="theia",
title="Theia",
product_line ="software/application",
reference="slaprunner",
reference="theia",
portal_type="Software Product"
)
if slaprunner_product.getValidationState() == "draft":
slaprunner_product.publish()
if theia_product.getValidationState() == "draft":
theia_product.publish()
try:
slaprunner_software_release = context.software_release_module["slaprunner"]
theia_software_release = context.software_release_module["theia"]
except KeyError:
slaprunner_software_release = context.software_release_module.newContent(
id="slaprunner",
title="Webrunner",
theia_software_release = context.software_release_module.newContent(
id="theia",
title="Theia",
portal_type="Software Release",
version="0.1",
language="en",
effective_date=DateTime('2018/03/14 00:00:00 UTC'),
aggregate="software_product_module/slaprunner"
aggregate="software_product_module/theia"
)
slaprunner_software_release.edit(
url_string="https://lab.nexedi.com/nexedi/slapos/raw/1.0.164/software/slaprunner/software.cfg"
theia_software_release.edit(
url_string="https://lab.nexedi.com/nexedi/slapos/raw/%s/software/theia/software.cfg" % software_version
)
if slaprunner_software_release.getValidationState() == "draft":
slaprunner_software_release.publishAlive()
if theia_software_release.getValidationState() == "draft":
theia_software_release.publishAlive()
portal = context.getPortalObject()
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_SlapOSORSParameterCommonTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="basic_rx_tx_scenario">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="eNB"]
</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="eNB"]
</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>eNB</td>
</tr>
<tr>
<td colspan="3"><b> Fill RX/TX </b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//tx_gain" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//tx_gain" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//tx_gain" and @type="number"]</td>
<td>78.0</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//rx_gain" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//rx_gain" and @type="number"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//rx_gain" and @type="number"]</td>
<td>78.0</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiP</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInR4X2dhaW4iOiA3OCwKICAgICJyeF9nYWluIjogNzgKfTwvcGFyYW1ldGVyPgo8L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="basic_gnb_sim_card_scenario">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="gNB-EPC Sim Card"]
</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="gNB-EPC Sim Card"]
</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>gNB-EPC Sim Card</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//sim_algo" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//sim_algo" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//sim_algo" and @type="text"]</td>
<td>x</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="//imsi" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="//imsi" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//imsi" and @type="text"]</td>
<td>x</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//sim_algo" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="//imsi" and @type="text"]</td>
<td></td>
</tr>
<tr>
<td>fireEvent</td>
<td>//input[@name="//imsi" and @type="text"]</td>
<td>change</td>
</tr>
<tr>
<td colspan="3"><b> Assert Error Messages</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "sim_algo".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "imsi".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "opc".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "amf".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "sqn".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "k".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "impu".']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@class="error" and text() = 'Instance does not have required property "impi".']</td>
<td></td>
</tr>
<tal:block tal:define="name python: '//sim_algo'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//imsi'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//opc'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//amf'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//sqn'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//k'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//impu'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block tal:define="name python:'//impi'; value python: 'some value'">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/input_text" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash" />
<tr>
<td>waitForTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiP</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGluc3RhbmNlPgogICAgPHBhcmFtZXRlciBpZD0iXyI+ewogICAgInNpbV9hbGdvIjogInNvbWUgdmFsdWUiLAogICAgImltc2kiOiAic29tZSB2YWx1ZSIsCiAgICAib3BjIjogInNvbWUgdmFsdWUiLAogICAgImFtZiI6ICJzb21lIHZhbHVlIiwKICAgICJzcW4iOiAic29tZSB2YWx1ZSIsCiAgICAiayI6ICJzb21lIHZhbHVlIiwKICAgICJpbXB1IjogInNvbWUgdmFsdWUiLAogICAgImltcGkiOiAic29tZSB2YWx1ZSIKfTwvcGFyYW1ldGVyPgo8L2luc3RhbmNlPg==</td>
<td></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_SlapOSParameterCommonTemplate</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="wait_software_type_selection">
<tr>
<td colspan="3"><b> Wait for software type </b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="wait_software_type_selection_default">
<tal:block metal:use-macro="here/Zuite_SlapOSParameterCommonTemplate/macros/wait_software_type_selection" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Default"]
</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="Default"]
</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="select_software_type_json_in_xml">
<tr>
<td colspan="3"><b> Change Software type</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="JSON in XML"]
</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]//option[text()="JSON in XML"]
</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//select[@name="software_type"]
</td>
<td>JSON in XML</td>
</tr>
</tal:block>
<tal:block metal:define-macro="init">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/#/?page=slap_test_parameter_form</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='url_string']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name='url_string']</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="click_proceed_and_wait_for_hash">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tr>
<td>waitForElementPresent</td>
<td>//pre[@id="parameter_output"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//pre[@id="parameter_output"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//p[@id="parameter_hash"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//p[@id="parameter_hash"]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="show_raw_parameter">
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-raw-parameter"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//textarea[@name="text_content"]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="show_form_parameter">
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url,
'gadget_erp5_page_slap_parameter_form.html')]//button[@class="slapos-show-form"]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="input_text">
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//input[@name=\'%s\' and @type=\'text\']' % name"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//input[@name=\'%s\' and @type=\'text\']' % name"></td>
<td></td>
</tr>
<tr>
<td>type</td>
<td tal:content="python: '//input[@name=\'%s\' and @type=\'text\']' % name"></td>
<td tal:content="python: value"></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment