+
+
+
+ open |
+ ${base_url} |
+ |
+
+
+ verifyTextPresent |
+ Welcome to ERP5 |
+ |
+
+
+ open |
+ ${base_url}/portal_ingestion_policies |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="IngestionPolicyTool_view"] |
+ |
+
+
+ clickAndWait |
+ //*[@id="context_bar"]/span[4]/span[1]/a[3] |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="dialog_id" and @value="IngestionPolicyTool_viewAddIngestionPolicyActionDialog"] |
+ |
+
+
+ type |
+ field_your_title |
+ Pydata |
+
+
+ type |
+ field_your_reference |
+ pydata |
+
+
+ clickAndWait |
+ //button[@name="Base_callDialogMethod:method" and @id="dialog_submit_button"] |
+ |
+
+
+ pause |
+ 3000 |
+ |
+
+
+
+
+ open |
+ ${base_url} |
+ |
+
+
+ selectAndWait |
+ select_module |
+ label=Web Sites |
+
+
+ verifyTextPresent |
+ Web Sites |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebSiteModule_viewWebSiteList"] |
+ |
+
+
+ type |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/input |
+ renderjs_runner |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input |
+ |
+
+
+ verifyElementPresent |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebSite_view"] |
+ |
+
+
+ verifyTextPresent |
+ RenderJS Runner |
+ |
+
+
+ open |
+ ${base_url}/web_site_module/renderjs_runner/ |
+ |
+
+
+ pause |
+ 15000 |
+ |
+
+
+ verifyTextPresent |
+ Worklist |
+ |
+
+
+ open |
+ ${base_url}/web_site_module/renderjs_runner?ignore_layout:int=1&editable;_mode:int=1&selection;_name=web_site_module_view_web_site_list_selection |
+ |
+
+
+ clickAndWait |
+ //button[@type="submit" and @title="Clone"] |
+ |
+
+
+ verifyTextPresent |
+ Created Clone Web Site. |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebSite_view"] |
+ |
+
+
+ pause |
+ 3000 |
+ |
+
+
+ type |
+ field_my_id |
+ pydata_runner |
+
+
+ type |
+ field_my_title |
+ Pydata Runner |
+ |
+
+ clickAndWait |
+ //button[@name="Base_edit:method" and @title="Save"] |
+ |
+
+
+ selectAndWait |
+ select_action |
+ label=Publish |
+
+
+ verifyElementPresent |
+ //*[@name="dialog_id" and @value="Base_viewWorkflowActionDialog"] |
+ |
+
+
+ clickAndWait |
+ //*[@id="dialog_submit_button"] |
+ |
+
+
+ verifyTextPresent |
+ Status changed. |
+ |
+
+
+ verifyTextPresent |
+ Published |
+ |
+
+
+ clickAndWait |
+ //div[@class="actions"]/ul/li[3]/a |
+ |
+
+
+ verifyTextPresent |
+ Front Page Gadget |
+ |
+
+
+ type |
+ field_my_configuration_frontpage_gadget_url |
+ pydata |
+
+
+ clickAndWait |
+ //*[@id="master"]/div/div[1]/button |
+ |
+
+
+ verifyTextPresent |
+ Data updated. |
+ |
+
+
+
+
+ open |
+ ${base_url}/ |
+ |
+
+
+ selectAndWait |
+ select_module |
+ label=Web Pages |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebPageModule_viewWebPageList"] |
+ |
+
+
+ type |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/input |
+ gadget_erp5_page_worklist.html |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input |
+ |
+
+
+ verifyElementPresent |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebPage_view"] |
+ |
+
+
+ verifyTextPresent |
+ Gadget ERP5 Worklist |
+ |
+
+
+ clickAndWait |
+ //button[@name="Base_createCloneDocument:method"] |
+ |
+
+
+ verifyTextPresent |
+ Created Clone Web Page. |
+ |
+
+
+ type |
+ field_my_title |
+ Gadget ERP5 PyData |
+
+
+ type |
+ field_my_reference |
+ gadget_erp5_page_pydata.html |
+
+
+ clickAndWait |
+ //button[@name="Base_edit:method" and @title="Save"] |
+ |
+
+
+ verifyTextPresent |
+ Data updated. |
+ |
+
+
+ selectAndWait |
+ select_action |
+ label=Publish Document Alive |
+
+
+ clickAndWait |
+ //*[@id="dialog_submit_button"] |
+ |
+
+
+ verifyTextPresent |
+ Status changed. |
+ |
+
+
+ verifyTextPresent |
+ Published Alive |
+ |
+
+
+ clickAndWait |
+ //div[@class="actions"]/ul/li[2]/a |
+ |
+
+
+ pause |
+ 3000 |
+ |
+
+
+ type |
+ //*[@data-gadget-editable="field_my_text_content"]/div |
+ |
+
+
+ clickAndWait |
+ //button[@name="Base_edit:method" and @title="Save"] |
+ |
+
+
+ verifyTextPresent |
+ Data updated. |
+ |
+
+
+
+ open |
+ ${base_url} |
+ |
+
+
+ selectAndWait |
+ select_module |
+ label=Web Pages |
+
+
+ type |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/input |
+ gadget_erp5_page_worklist.js |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input |
+ |
+
+
+ verifyElementPresent |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ clickAndWait |
+ //*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a |
+ |
+
+
+ verifyElementPresent |
+ //*[@name="form_id" and @value="WebPage_view"] |
+ |
+
+
+ verifyTextPresent |
+ Gadget ERP5 Worklist JS |
+ |
+
+
+ clickAndWait |
+ //button[@name="Base_createCloneDocument:method"] |
+ |
+
+
+ verifyTextPresent |
+ Created Clone Web Script. |
+ |
+
+
+ type |
+ field_my_title |
+ Gadget ERP5 PyData JS |
+
+
+ type |
+ field_my_reference |
+ gadget_erp5_page_pydata.js |
+
+
+ clickAndWait |
+ //*[@id="master"]/div/div[1]/button |
+ |
+
+
+ verifyTextPresent |
+ Data updated. |
+ |
+
+
+ selectAndWait |
+ select_action |
+ label=Publish Document Alive |
+
+
+ clickAndWait |
+ //*[@id="dialog_submit_button"] |
+ |
+
+
+ verifyTextPresent |
+ Status changed. |
+ |
+
+
+ verifyTextPresent |
+ Published Alive |
+ |
+
+
+ clickAndWait |
+ //*[@id="master"]/div/div[1]/ul/li[2]/a |
+ |
+
+
+ pause |
+ 3000 |
+ |
+
+
+ type |
+ //*[@data-gadget-editable="field_my_text_content"]/div |
+ /*global window, rJS, console, RSVP, Dygraph */
+/*jslint indent: 2, maxerr: 3 */
+(function (rJS) {
+ "use strict";
+
+ var ARRAY_VALUE_LENGTH = 8,
+ OPTION_DICT = {
+ start_date: 0,
+ time_factor: 1000,
+ resolution: 1,
+ xlabel: 'x',
+ ylabel: 'y',
+ key_list: ["Channel 1", "Date"],
+ label_list: ["Date", "Channel 1"],
+ series_dict: {
+ "Channel 1": {
+ axis : "y",
+ color: "#00884B",
+ pointSize: 1,
+ visible : true,
+ connectSeparatedPoints: true
+ }
+ },
+ axis_dict: {
+ y: {
+ position : "left",
+ axisLabelColor: "grey",
+ axisLabelWidth : 40,
+ pixelsPerLabel : 30
+ },
+ x: {
+ drawAxis : true,
+ axisLabelWidth : 60,
+ axisLabelColor: "grey",
+ pixelsPerLabel : 30
+ }
+ },
+ connectSeparatedPoints: true
+ };
+
+ function generateInitialGraphData(label_list) {
+ var i,
+ data = [[]];
+ for (i = 0; i < label_list.length; i += 1) {
+ data[0].push(0);
+ }
+ return data;
+ }
+
+ function convertDateColToDate(gadget, array) {
+ var label_list = gadget.property_dict.option_dict.label_list,
+ time_factor = gadget.property_dict.option_dict.time_factor,
+ time_offset = gadget.property_dict.option_dict.time_offset || 0,
+ i,
+ k;
+
+ for (k = 0; k < label_list.length; k += 1) {
+ if (label_list[k] === "Date") {
+ for (i = 0; i < array.length; i += 1) {
+ array[i] = [i, array[i]];
+ }
+ }
+ }
+ return array;
+ }
+
+ rJS(window)
+
+ .ready(function (gadget) {
+ gadget.property_dict = {};
+ return gadget.getElement()
+ .push(function (element) {
+ gadget.property_dict.element = element;
+ gadget.property_dict.option_dict = OPTION_DICT;
+ });
+ })
+
+ .declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
+
+ // render gadget
+ .declareMethod('render', function () {
+ var gadget = this,
+ interaction_model = Dygraph.Interaction.defaultModel,
+ option_dict = {},
+ url;
+
+ url = "${base_url}/web_site_module/pydata_runner/hateoas/data_array_module/wendelin-Tutorial.Installation.Usage.Test.Spectrum";
+
+ return new RSVP.Queue()
+ .push(function () {
+ return gadget.jio_getAttachment("erp5", url, {
+ start : 0,
+ format : "array_buffer"
+ });
+ })
+ .push(function (buffer) {
+ var array_length,
+ length,
+ array,
+ array_width = 1;
+
+ array_length = Math.floor(
+ buffer.byteLength / array_width / ARRAY_VALUE_LENGTH
+ );
+ length = buffer.byteLength - (buffer.byteLength % ARRAY_VALUE_LENGTH);
+ if (length === buffer.byteLength) {
+ array = new Float64Array(buffer);
+ } else {
+ array = new Float64Array(buffer, 0, length);
+ }
+ return nj.ndarray(array, [array_length, array_width]);
+ })
+ .push(function (result) {
+ var i,
+ data = [],
+ ndarray = result,
+ label_list = gadget.property_dict.option_dict.label_list,
+ key_list = gadget.property_dict.option_dict.key_list;
+
+ for (i = 1; i < label_list.length; i += 1) {
+ data = data.concat(
+ nj.unpack(
+ ndarray.pick(
+ null,
+ key_list.indexOf(label_list[i])
+ )
+ )
+ );
+ }
+
+ data = convertDateColToDate(gadget, data);
+
+ gadget.property_dict.data = data;
+ return gadget
+ });
+ })
+
+ .declareService(function () {
+ var gadget = this;
+
+ return gadget.property_dict.graph = new Dygraph(
+ gadget.property_dict.element,
+ gadget.property_dict.data,
+ gadget.property_dict.option_dict
+ );
+ });
+
+}(rJS)); |
+
+
+ clickAndWait |
+ //button[@name="Base_edit:method" and @title="Save"] |
+ |
+
+
+ assertTextPresent |
+ Data updated. |
+ |
+
+
+
+ open |
+ ${base_url}/web_site_module/pydata_runner/ |
+ |
+
+
+ pause |
+ 15000 |
+ |
+
+
+ verifyElementPresent |
+ //*[@data-gadget-url="https://softinst116522.host.vifib.net/erp5/web_site_module/pydata_runner/gadget_jio.html"] |
+ |
+
+
+
+