Commit ecb9cf84 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] SearchEditor: improve unexpected parameter handling.

The typical use case is to go to a module from a worklist link.
This leads to a complex query to display only the matching documents.

Opening the filter panel should not lead to lose the query.
User must be able to add extra parameters to this query thanks to the filter panel.

This was done by:
* changing the DOM only in the changeState method
* handling unexpected search expression (not parsable, complex one, unknown column, ...)
* improving query operator support
* dropping not needed HTML element attributes.
* adding tests
parent fb5c670c
......@@ -191,7 +191,6 @@
if (field_json.search_column_list.length) {
search_column_list = field_json.search_column_list.filter(is_in_column_list);
}
search_column_list.push(["searchable_text", "Searchable Text"]);
url_query = options.extended_search;
query_string = new URI(field_json.query).query(true).query;
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.56527.16709.20804</string> </value>
<value> <string>963.40734.12928.52855</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1506527031.12</float>
<float>1511430200.52</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -3,15 +3,14 @@
<!--
data-i18n=All criterions (AND)
data-i18n=At least one (OR)
data-i18n=Exact Match
data-i18n=keyword
data-i18n=Contain
data-i18n=Contains
data-i18n=Equals To
data-i18n=Greater Than
data-i18n=Less Than
data-i18n=Not Greater Than
data-i18n=Not Less Than
data-i18n=Searchable Text
data-i18n=Search Expression
-->
<head>
<meta charset="utf-8" />
......@@ -26,38 +25,20 @@
<!-- custom script -->
<script src="gadget_erp5_search_editor.js"></script>
<script id="options-template" type="text/x-handlebars-template">
<select data-iconpos="left">
{{#each option}}
<option value="{{value}}" data-i18n="{{text}}">{{text}}</option>
{{/each}}
</select>
</script>
<script id="filter-item-template" type="text/x-handlebars-template">
<button class="ui-icon ui-btn ui-btn-inline ui-icon-minus ui-icon-shadow"></button>
<div class="filter_item {{class_value}}" >
<select class="column" data-iconpos="left">
<div class="filter_item auto" >
<select class="column">
{{#each option}}
{{#equal value selected_option}}
<option selected="selected" data-i18n="{{text}}" value="{{value}}">{{text}}</option>
{{else}}
<option value="{{value}}" data-i18n="{{text}}">{{text}}</option>
{{/equal}}
<option {{#if selected}}selected="selected"{{/if}} data-i18n="{{text}}" value="{{value}}">{{text}}</option>
{{/each}}
</select>
<select data-iconpos="left" >
<select>
{{#each operator_option}}
{{#equal value selected_option}}
<option selected="selected" data-i18n="{{text}}" value="{{value}}">{{text}}</option>
{{else}}
<option value="{{value}}" data-i18n="{{text}}">{{text}}</option>
{{/equal}}
<option {{#if selected}}selected="selected"{{/if}} data-i18n="{{text}}" value="{{value}}">{{text}}</option>
{{/each}}
</select>
<div class="ui-controlgroup-controls">
<input type="{{input_type}}" value="{{input_value}}"></input>
</div>
<input type="{{input_type}}" value="{{input_value}}" required></input>
</div>
</script>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.38108.27853.11810</string> </value>
<value> <string>963.43942.50655.56934</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1480342657.32</float>
<float>1511789326.02</float>
<string>UTC</string>
</tuple>
</state>
......
/*jslint indent: 2, maxerr: 3, maxlen: 100, nomen: true */
/*global window, document, rJS, RSVP, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query, console*/
(function (window, document, rJS, RSVP, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query, console) {
/*global window, document, rJS, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query*/
(function (window, document, rJS, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query) {
"use strict";
var gadget_klass = rJS(window),
template_element = gadget_klass.__template_element,
......@@ -13,29 +13,19 @@
filter_template = Handlebars.compile(template_element
.getElementById("filter-template")
.innerHTML),
options_template = Handlebars.compile(template_element
.getElementById("options-template")
.innerHTML),
NUMERIC = [
["Equals To", "="], ["Greater Than", ">"],
["Less Than", "<"], ["Not Greater Than", "<="],
["Not Less Than", ">="]
],
OTHER = [
["Exact Match", "exacte_match"],
["keyword", "keyword"]
["Equals To", "exact_match"],
["Contains", "keyword"]
],
DEFAULT = [["Contain", "Contain"]];
Handlebars.registerHelper('equal', function (left_value, right_value, options) {
if (arguments.length < 3) {
throw new Error("Handlebars Helper equal needs 2 parameters");
}
if (left_value !== right_value) {
return options.inverse(this);
}
return options.fn(this);
});
DEFAULT = [["Contains", "contain"]],
PREFIX_COLUMN = 'COLUMN_',
PREFIX_RAW = 'RAW',
PREFIX_TEXT = 'TEXT';
// XXX
// define input's type according to column's value
......@@ -46,74 +36,113 @@
value.indexOf('price') !== -1;
}
function createOptionsTemplate(gadget, value) {
var option = [],
tmp,
i;
if (value !== "searchable_text") {
if (isNumericComparison(value)) {
tmp = NUMERIC;
} else {
tmp = OTHER;
}
} else {
tmp = DEFAULT;
}
for (i = 0; i < tmp.length; i += 1) {
option.push({
text: tmp[i][0],
value: tmp[i][1]
});
}
return gadget.translateHtml(options_template({option: option}));
}
function createFilterItemTemplate(gadget, class_value, filter_item) {
var column_list = gadget.state.search_column_list,
option = [],
tmp,
operator_option = [],
function createFilterItemTemplate(gadget, query_dict) {
var operator_default_list = DEFAULT,
operator_option_list = [],
column_option_list = [],
input_type = "search",
i;
i,
is_selected;
if (filter_item) {
if (isNumericComparison(filter_item.key)) {
tmp = NUMERIC;
if (filter_item.key.indexOf("date") !== -1) {
if (query_dict.key.indexOf(PREFIX_COLUMN) === 0) {
if (isNumericComparison(query_dict.key)) {
operator_default_list = NUMERIC;
if (query_dict.key.indexOf("date") !== -1) {
input_type = "date";
} else {
input_type = "number";
}
} else {
tmp = OTHER;
operator_default_list = OTHER;
}
} else {
tmp = DEFAULT;
filter_item = {};
}
for (i = 0; i < tmp.length; i += 1) {
operator_option.push({
text: tmp[i][0],
value: tmp[i][1],
selected_option: filter_item.operator
if (!query_dict.operator) {
// Set the default operator depending of the type of the column
query_dict.operator = operator_default_list[0][1];
}
is_selected = false;
for (i = 0; i < operator_default_list.length; i += 1) {
is_selected = is_selected || (query_dict.operator === operator_default_list[i][1]);
operator_option_list.push({
text: operator_default_list[i][0],
value: operator_default_list[i][1],
selected: (query_dict.operator === operator_default_list[i][1])
});
}
if (!is_selected) {
// Do not lose the query operator even if it is not handled by the UI
// Do not try to change it to another value, as it means losing user data
if (query_dict.key.indexOf(PREFIX_COLUMN) === 0) {
query_dict.key = query_dict.key.slice(PREFIX_COLUMN.length);
} else {
query_dict.key = '';
}
query_dict.value = Query.objectToSearchText(new SimpleQuery({
key: query_dict.key,
operator: query_dict.operator,
type: "simple",
value: query_dict.value
}));
query_dict.operator = DEFAULT[0][1];
query_dict.key = PREFIX_RAW;
operator_option_list = [{
text: DEFAULT[0][0],
value: DEFAULT[0][1],
selected: true
}];
}
for (i = 0; i < column_list.length; i += 1) {
option.push({
text: column_list[i][1],
value: column_list[i][0],
selected_option: filter_item.key || "searchable_text"
is_selected = false;
for (i = 0; i < gadget.state.search_column_list.length; i += 1) {
is_selected = is_selected || (query_dict.key === gadget.state.search_column_list[i][0]);
column_option_list.push({
text: gadget.state.search_column_list[i][1],
value: gadget.state.search_column_list[i][0],
selected: (query_dict.key === gadget.state.search_column_list[i][0])
});
}
return gadget.translateHtml(filter_item_template({
option: option,
operator_option: operator_option,
class_value: class_value,
input_value: filter_item.value,
if (!is_selected) {
throw new Error('SearchEditor: no key found for: ' + query_dict.key);
}
return filter_item_template({
option: column_option_list,
operator_option: operator_option_list,
input_value: query_dict.value,
input_type: input_type
}));
});
}
function getQueryStateFromDOM(gadget) {
var operator_select = gadget.element.querySelector("select"),
state = {
query_list: [],
operator: operator_select[operator_select.selectedIndex].value
},
i,
filter_item_list = gadget.element.querySelectorAll(".filter_item"),
select_list;
for (i = 0; i < filter_item_list.length; i += 1) {
select_list = filter_item_list[i].querySelectorAll("select");
state.query_list.push({
value: filter_item_list[i].querySelector("input").value,
operator: select_list[1][select_list[1].selectedIndex].value,
key: select_list[0][select_list[0].selectedIndex].value
});
}
return state;
}
function getElementIndex(node) {
var index = -1;
while (node) {
node = node.previousElementSibling;
index += 1;
}
return index;
}
gadget_klass
......@@ -127,67 +156,140 @@
//////////////////////////////////////////////
// initialize the gadget content
//////////////////////////////////////////////
.declareMethod('render', function (options) {
var operator = 'AND',
query_list = [],
i,
jio_query,
len,
sub_jio_query,
search_column_list = [],
search_column_dict = {};
len = options.search_column_list.length;
for (i = 0; i < len; i += 1) {
search_column_dict[options.search_column_list[i][0]] = true;
search_column_list.push([
PREFIX_COLUMN + options.search_column_list[i][0],
options.search_column_list[i][1]
]);
}
search_column_list.push([PREFIX_TEXT, "Searchable Text"]);
search_column_list.push([PREFIX_RAW, "Search Expression"]);
// When the raw query is modified, reset the full gadget
if (options.extended_search) {
// Parse the raw query
try {
jio_query = QueryFactory.create(options.extended_search);
} catch (error) {
// it catch all error, not only search criteria invalid error
query_list.push({
key: PREFIX_RAW,
value: options.extended_search
});
}
if (jio_query instanceof SimpleQuery) {
if (jio_query.key) {
if (search_column_dict.hasOwnProperty(jio_query.key)) {
query_list.push({
key: PREFIX_COLUMN + jio_query.key,
value: jio_query.value,
operator: jio_query.operator
});
} else {
query_list.push({
key: PREFIX_RAW,
value: Query.objectToSearchText(jio_query)
});
}
} else {
query_list.push({
key: PREFIX_TEXT,
value: jio_query.value
});
}
} else if (jio_query instanceof ComplexQuery) {
operator = jio_query.operator;
len = jio_query.query_list.length;
for (i = 0; i < len; i += 1) {
sub_jio_query = jio_query.query_list[i];
if (sub_jio_query instanceof SimpleQuery) {
if (sub_jio_query.key) {
if (search_column_dict.hasOwnProperty(sub_jio_query.key)) {
query_list.push({
key: PREFIX_COLUMN + sub_jio_query.key,
value: sub_jio_query.value,
operator: sub_jio_query.operator
});
} else {
query_list.push({
key: PREFIX_RAW,
value: Query.objectToSearchText(sub_jio_query)
});
}
} else {
query_list.push({
key: PREFIX_TEXT,
value: sub_jio_query.value
});
}
} else {
query_list.push({
key: PREFIX_RAW,
value: Query.objectToSearchText(sub_jio_query)
});
}
}
}
} else {
query_list.push({
key: search_column_list[0][0],
value: ''
});
}
return this.changeState({
search_column_list: search_column_list,
begin_from_key: options.begin_from,
// [{key: 'title', value: 'Foo', operator: 'like'}]
query_list: query_list,
// and/or
operator: operator
});
})
.onStateChange(function () {
var gadget = this,
container = gadget.element.querySelector(".container"),
div = document.createElement("div"),
subdiv,
operator_select,
filter_item_container,
query_list = [],
promise_list = [],
i;
return gadget.translateHtml(filter_template())
.push(function (translated_html) {
div.innerHTML = translated_html;
div.innerHTML = filter_template();
operator_select = div.querySelector("select");
if (gadget.state.operator === "OR") {
operator_select.querySelectorAll("option")[1].setAttribute('selected', 'selected');
}
filter_item_container = div.querySelector(".filter_item_container");
if (gadget.state.extended_search) {
// string to query
try {
query_list = QueryFactory.create(gadget.state.extended_search);
} catch (error) {
// XXX hack to not crash interface
// it catch all error, not only search criteria invalid error
console.warn(error);
return [];
}
if (query_list.operator === "OR") {
operator_select.querySelectorAll("option")[1].selected = "selected";
}
query_list = query_list.query_list || [query_list];
for (i = 0; i < query_list.length; i += 1) {
promise_list.push(createFilterItemTemplate(gadget, "auto", query_list[i]));
}
} else if (gadget.state.search_column_list.length > 0) {
// No search query was provided
// Add an empty search parameter for the first searchable column
promise_list.push(
createFilterItemTemplate(
gadget,
"auto",
new SimpleQuery({
key: gadget.state.search_column_list[0][1],
operator: "",
type: "simple",
value: ''
})
)
);
}
return RSVP.all(promise_list);
})
.push(function (result_list) {
var subdiv;
for (i = 0; i < result_list.length; i += 1) {
for (i = 0; i < gadget.state.query_list.length; i += 1) {
subdiv = document.createElement("div");
subdiv.innerHTML = result_list[i];
subdiv.innerHTML = createFilterItemTemplate(gadget, gadget.state.query_list[i]);
filter_item_container.appendChild(subdiv);
}
return gadget.translateHtml(div.innerHTML)
.push(function (translated_html) {
div.innerHTML = translated_html;
while (container.firstChild) {
container.removeChild(container.firstChild);
}
......@@ -204,70 +306,59 @@
}
})
.declareMethod('render', function (options) {
return this.changeState({
search_column_list: options.search_column_list,
begin_from: options.begin_from,
extended_search: options.extended_search
});
})
.onEvent('submit', function () {
var i,
gadget = this,
simple_operator,
var new_state = getQueryStateFromDOM(this),
operator = new_state.operator,
query_list = new_state.query_list,
query,
key,
select_list,
simple_query_list = [],
complex_query,
select,
value,
options = {},
filter_item_list = gadget.element.querySelectorAll(".filter_item"),
operator_select = gadget.element.querySelector("select"),
operator = operator_select[operator_select.selectedIndex].value;
for (i = 0; i < filter_item_list.length; i += 1) {
select_list = filter_item_list[i].querySelectorAll("select");
value = filter_item_list[i].querySelector("input").value;
simple_operator = "";
select = select_list[1][select_list[1].selectedIndex].value;
if (select === "keyword") {
value = "%" + value + "%";
} else if (["", ">", "<", "<=", ">="].indexOf(select) !== -1) {
simple_operator = select;
len = query_list.length,
i,
jio_query_list = [],
options = {};
for (i = 0; i < len; i += 1) {
query = query_list[i];
if (query.operator === 'keyword') {
query.value = '%' + query.value + '%';
query.operator = '';
} else if (["", ">", "<", "<=", ">="].indexOf(query.operator) === -1) {
query.operator = '';
}
if (select_list[0][select_list[0].selectedIndex].value === "searchable_text") {
key = "";
if (query.key === PREFIX_RAW) {
try {
jio_query_list.push(QueryFactory.create(query.value));
} catch (ignore) {
// If the value can not be parsed by jio, drop it
}
} else {
if (query.key.indexOf(PREFIX_COLUMN) === 0) {
query.key = query.key.slice(PREFIX_COLUMN.length);
} else {
key = select_list[0][select_list[0].selectedIndex].value;
query.key = '';
}
simple_query_list.push(new SimpleQuery(
{
key: key,
operator: simple_operator,
jio_query_list.push(new SimpleQuery({
key: query.key,
operator: query.operator,
type: "simple",
value: value
value: query.value
}));
}
));
}
if (simple_query_list.length > 0) {
complex_query = new ComplexQuery({
if (jio_query_list.length > 0) {
options.extended_search = Query.objectToSearchText(new ComplexQuery({
operator: operator,
query_list: simple_query_list,
query_list: jio_query_list,
type: "complex"
});
//query to string
query = Query.objectToSearchText(complex_query);
}));
} else {
query = "";
options.extended_search = '';
}
options.extended_search = query;
options[gadget.state.begin_from] = undefined;
return gadget.redirect({
options[this.state.begin_from_key] = undefined;
return this.redirect({
command: 'store_and_change',
options : options
});
......@@ -275,7 +366,7 @@
})
.onEvent('click', function (evt) {
var gadget = this;
var new_state;
if (evt.target.classList.contains('close')) {
evt.preventDefault();
......@@ -284,13 +375,15 @@
if (evt.target.classList.contains('plus')) {
evt.preventDefault();
return createFilterItemTemplate(gadget, 'auto')
.push(function (template) {
var tmp = document.createElement("div"),
container = gadget.element.querySelector(".filter_item_container");
tmp.innerHTML = template;
container.appendChild(tmp);
new_state = getQueryStateFromDOM(this);
// XXX Duplicated code
// XXX XXX Should select the first column which doesn't have a value
new_state.query_list.push({
key: this.state.search_column_list[0][0],
value: ''
// operator: 'exact_match'
});
return this.changeState(new_state);
}
if (evt.target.classList.contains('ui-icon-minus')) {
......@@ -300,24 +393,15 @@
}, false, false)
.onEvent('change', function (evt) {
var gadget = this;
if (evt.target.classList.contains('column')) {
// Reset the operator when user change the column/key
evt.preventDefault();
return createOptionsTemplate(gadget, evt.target.value)
.push(function (innerHTML) {
evt.target.parentElement.querySelectorAll('select')[1].innerHTML = innerHTML;
if (isNumericComparison(evt.target.value)) {
if (evt.target.value.indexOf("date") !== -1) {
evt.target.parentElement.querySelector('input').setAttribute("type", "date");
} else {
evt.target.parentElement.querySelector('input').setAttribute("type", "number");
}
} else {
evt.target.parentElement.querySelector('input').setAttribute("type", "text");
}
});
var new_state = getQueryStateFromDOM(this),
index = getElementIndex(evt.target.parentElement.parentElement);
delete new_state.query_list[index].operator;
return this.changeState(new_state);
}
}, false, false);
}(window, document, rJS, RSVP, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query, console));
\ No newline at end of file
}(window, document, rJS, Handlebars,
QueryFactory, SimpleQuery, ComplexQuery, Query));
\ No newline at end of file
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.33713.16839.14114</string> </value>
<value> <string>963.48038.37111.52804</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1510929709.6</float>
<float>1511789322.9</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -50,12 +50,12 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
......@@ -64,7 +64,7 @@
<tr>
<td>verifyValue</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]//select</td>
<td>id</td>
<td>COLUMN_id</td>
</tr>
<tr>
<td>verifyValue</td>
......@@ -76,7 +76,7 @@
</tr>
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......@@ -94,7 +94,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'T%', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_title', 'value': 'T%', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
<?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>testFilterBadGrammar</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 RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'AND OR'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'RAW', 'value': 'AND OR', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -54,12 +54,12 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
......@@ -50,12 +50,12 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
<?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>testFilterNotSupportedOperator</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 RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'id:>&#34;1&#34;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'RAW', 'value': 'id: > &#34;1&#34;', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id: > &#34;1&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<!-- Open the panel a second time and submit it. Check that the new query string is identical -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id: > &#34;1&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</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>testFilterSubComplexQuery</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 RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'id:&#34;1&#34; OR (id:&#34;2&#34; AND id:&#34;3&#34;)'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '1', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block tal:define="filter_section_configuration python: {'key': 'RAW', 'value': '( id: &nbsp;&#34;2&#34; AND id: &nbsp;&#34;3&#34; )', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id: &nbsp;&#34;1&#34; OR ( id: &nbsp;&#34;2&#34; AND id: &nbsp;&#34;3&#34; ) )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<!-- Open the panel a second time and submit it. Check that the new query string is identical -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id: &nbsp;&#34;1&#34; OR ( id: &nbsp;&#34;2&#34; AND id: &nbsp;&#34;3&#34; ) )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block tal:define="filter_section_configuration python: {'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</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>testFilterSupportedOperator</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 RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/bar_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'quantity:>&#34;2&#34;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_quantity', 'value': '2', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( quantity: > &#34;2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<!-- Open the panel a second time and submit it. Check that the new query string is identical -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( quantity: > &#34;2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</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>testFilterUnknownKey</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 RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'foo:&#34;31085&#34;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'RAW', 'value': 'foo: &nbsp;&#34;31085&#34;', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( foo: &nbsp;&#34;31085&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<!-- Open the panel a second time and submit it. Check that the new query string is identical -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( foo: &nbsp;&#34;31085&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -54,22 +54,22 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '1', 'index': 1}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '1', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '2', 'index': 2}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '2', 'index': 2}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '3', 'index': 3}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '3', 'index': 3}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
......@@ -52,7 +52,7 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block tal:define="filter_section_configuration python: {'key': 'COLUMN_id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
......
......@@ -54,13 +54,13 @@
<tr>
<td>verifySelectOptions</td>
<td>//div[@class="filter_item_container"]/div[1]//select[1]</td>
<td>ID,biaoti,soushuowenben</td>
<td>ID,biaoti,soushuowenben,soushuo</td>
</tr>
<tr>
<td>verifySelectOptions</td>
<td>//div[@class="filter_item_container"]/div[1]//select[2]</td>
<td>wangquanfuhe,guanjianchi</td>
<td>dengyu,baohang</td>
</tr>
......@@ -74,7 +74,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//option[@data-i18n='Contain']</td>
<td>//option[@data-i18n='Contains']</td>
<td></td>
</tr>
......
......@@ -5,7 +5,7 @@ param_dict = [
{ 'message': 'Proceed', 'translation': 'jixu', 'language': 'wo'},
{ 'message': 'Title', 'translation': 'biaoti', 'language': 'wo'},
{ 'message': 'Equals To', 'translation': 'dengyu', 'language': 'wo'},
{ 'message': 'Contain', 'translation': 'baohang', 'language': 'wo'},
{ 'message': 'Contains', 'translation': 'baohang', 'language': 'wo'},
{ 'message': 'Search', 'translation': 'soushuo', 'language': 'wo'},
{ 'message': 'Next', 'translation': 'houyige', 'language': 'wo'},
{ 'message': 'Add', 'translation': 'zhenjia', 'language': 'wo'},
......@@ -37,10 +37,10 @@ param_dict = [
{ 'message': 'ascending', 'translation': 'shangshen', 'language': 'wo'},
{ 'message': 'Filter', 'translation': 'guolv', 'language': 'wo'},
{ 'message': 'Searchable Text', 'translation': 'soushuowenben', 'language': 'wo'},
{ 'message': 'Search Expression', 'translation': 'soushuo', 'language': 'wo'},
{ 'message': 'Close', 'translation': 'guangbi', 'language': 'wo'},
{ 'message': 'Worklist', 'translation': 'gongzhuoliebiao', 'language': 'wo'},
{ 'message': 'Delete', 'translation': 'shangchu', 'language': 'wo'},
{ 'message': 'keyword', 'translation': 'guanjianchi', 'language': 'wo'},
{ 'message': 'Reference', 'translation': 'chankao', 'language': 'wo'},
{ 'message': 'Filter Editor', 'translation': 'guolvbianjiqi', 'language': 'wo'},
{ 'message': 'Select Template', 'translation': 'xuanzhemoban', 'language': 'wo'},
......@@ -49,7 +49,6 @@ param_dict = [
{ 'message': 'Hide Rows', 'translation': 'yanchanlie', 'language': 'wo'},
{ 'message': 'Jump', 'translation': 'tiaozhuan', 'language': 'wo'},
{ 'message': 'Export', 'translation': 'daochu', 'language': 'wo'},
{ 'message': 'Exact Match', 'translation': 'wangquanfuhe', 'language': 'wo'},
{ 'message': 'At least one (OR)', 'translation': 'zhishaoyige', 'language': 'wo'},
{ 'message': 'Not Less Than', 'translation': 'dayudengyu', 'language': 'wo'},
{ 'message': 'Not Greater Than', 'translation': 'xiaoyudengyu', 'language': 'wo'},
......
......@@ -660,4 +660,23 @@
</tr>
</tal:block>
<tal:block metal:define-macro="check_filter_section">
<tr>
<td colspan="3"><b tal:content="python: 'Check the filter section %(index)i' % filter_section_configuration"></b></td>
</tr>
<tr>
<td>verifyValue</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//select' % (filter_section_configuration['index'] + 1)"></td>
<td tal:content="python: filter_section_configuration['key']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//input' % (filter_section_configuration['index'] + 1)"></td>
<td tal:content="python: filter_section_configuration['value']"></td>
</tr>
<tr>
<td colspan="3"><p></p></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