cucu 1.3.8__tar.gz → 1.3.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cucu might be problematic. Click here for more details.
- {cucu-1.3.8 → cucu-1.3.10}/PKG-INFO +1 -1
- {cucu-1.3.8 → cucu-1.3.10}/pyproject.toml +1 -1
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/ansi_parser.py +2 -1
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/db.py +10 -5
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/formatter/junit.py +3 -1
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/formatter/rundb.py +5 -1
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/fuzzy/core.py +7 -1
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/fuzzy/fuzzy.js +78 -53
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/templates/scenario.html +3 -0
- {cucu-1.3.8 → cucu-1.3.10}/README.md +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/behave_tweaks.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/browser/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/browser/core.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/browser/frames.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/browser/selenium.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/browser/selenium_tweaks.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/cli/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/cli/core.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/cli/run.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/cli/steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/cli/thread_dumper.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/config.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/edgedriver_autoinstaller/README.md +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/edgedriver_autoinstaller/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/edgedriver_autoinstaller/utils.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/environment.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/external/jquery/jquery-3.5.1.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/formatter/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/formatter/cucu.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/formatter/json.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/fuzzy/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/helpers.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/hooks.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/.gitignore +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/README.md +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/cucurc.yml +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/data/www/example.html +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/cucurc.yml +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/environment.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/example.feature +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/lint_rules/sid.yaml +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/steps/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/init_data/features/steps/my_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/language_server/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/language_server/core.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/lint/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/lint/linter.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/lint/rules/format.yaml +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/logger.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/matcher/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/matcher/core.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/page_checks.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/bootstrap.min.css +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/bootstrap.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/dataTables.bootstrap.min.css +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/dataTables.bootstrap.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/jquery-3.5.1.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/jquery.dataTables.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/external/popper.min.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/favicon.png +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/html.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/templates/feature.html +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/templates/flat.html +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/templates/index.html +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/reporter/templates/layout.html +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/__init__.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/base_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/browser_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/button_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/checkbox_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/command_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/draggable_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/dropdown_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/file_input_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/filesystem_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/flow_control_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/image_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/input_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/link_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/menuitem_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/platform_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/radio_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/section_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/step_utils.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/tab_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/table_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/tables.js +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/text_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/variable_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/steps/webserver_steps.py +0 -0
- {cucu-1.3.8 → cucu-1.3.10}/src/cucu/utils.py +0 -0
|
@@ -25,12 +25,13 @@ TRANSLATION = (
|
|
|
25
25
|
ESC_SEQ + "55": "", # ignore HOME (num keypad)
|
|
26
26
|
ESC_SEQ + "56": "", # ignore UP ARROW (num keypad)
|
|
27
27
|
ESC_SEQ + "57": "", # ignore PAGE UP (num keypad)
|
|
28
|
+
ESC_SEQ + "1A": "", # ignore move cursor up one line
|
|
28
29
|
}
|
|
29
30
|
)
|
|
30
31
|
RE_TO_HTML = re.compile("|".join(map(re.escape, TRANSLATION)))
|
|
31
32
|
|
|
32
33
|
RE_TO_REMOVE = re.compile(
|
|
33
|
-
r"\x1b\[(0;)?[0-9A-F]{1,2}
|
|
34
|
+
r"\x1b\[(0;)?[0-9A-F]{1,2}[mA]:?"
|
|
34
35
|
) # detect hex values, not just decimal digits
|
|
35
36
|
|
|
36
37
|
|
|
@@ -123,16 +123,16 @@ class step(BaseModel):
|
|
|
123
123
|
duration = FloatField(null=True)
|
|
124
124
|
start_at = DateTimeField(null=True)
|
|
125
125
|
end_at = DateTimeField(null=True)
|
|
126
|
-
stdout = JSONField(
|
|
127
|
-
stderr = JSONField(
|
|
126
|
+
stdout = JSONField()
|
|
127
|
+
stderr = JSONField()
|
|
128
128
|
error_message = JSONField(null=True)
|
|
129
129
|
exception = JSONField(null=True)
|
|
130
|
-
debug_output = TextField(
|
|
131
|
-
browser_info = JSONField(
|
|
130
|
+
debug_output = TextField()
|
|
131
|
+
browser_info = JSONField()
|
|
132
132
|
text = JSONField(null=True)
|
|
133
133
|
table_data = JSONField(null=True)
|
|
134
134
|
location = TextField()
|
|
135
|
-
browser_logs = TextField(
|
|
135
|
+
browser_logs = TextField()
|
|
136
136
|
screenshots = JSONField(null=True)
|
|
137
137
|
|
|
138
138
|
|
|
@@ -213,6 +213,11 @@ def start_step_record(step_obj, scenario_run_id):
|
|
|
213
213
|
is_substep=getattr(step_obj, "is_substep", False),
|
|
214
214
|
has_substeps=getattr(step_obj, "has_substeps", False),
|
|
215
215
|
section_level=getattr(step_obj, "section_level", None),
|
|
216
|
+
browser_info="",
|
|
217
|
+
browser_logs="",
|
|
218
|
+
debug_output="",
|
|
219
|
+
stderr=[],
|
|
220
|
+
stdout=[],
|
|
216
221
|
)
|
|
217
222
|
|
|
218
223
|
|
|
@@ -10,6 +10,7 @@ from behave.model_core import Status
|
|
|
10
10
|
from bs4.formatter import XMLFormatter
|
|
11
11
|
from tenacity import RetryError
|
|
12
12
|
|
|
13
|
+
from cucu.ansi_parser import remove_ansi
|
|
13
14
|
from cucu.config import CONFIG
|
|
14
15
|
from cucu.utils import ellipsize_filename
|
|
15
16
|
|
|
@@ -286,7 +287,8 @@ class CucuJUnitFormatter(Formatter):
|
|
|
286
287
|
if scenario["failure"] is not None:
|
|
287
288
|
failure_message = "\n".join(scenario["failure"])
|
|
288
289
|
failure = bs4.Tag(name="failure")
|
|
289
|
-
|
|
290
|
+
cleaned_failure_message = remove_ansi(failure_message)
|
|
291
|
+
failure.append(bs4.CData(cleaned_failure_message))
|
|
290
292
|
testcase.append(failure)
|
|
291
293
|
|
|
292
294
|
if scenario["skipped"] is not None:
|
|
@@ -132,6 +132,8 @@ class RundbFormatter(Formatter):
|
|
|
132
132
|
def scenario(self, scenario):
|
|
133
133
|
"""Called before a scenario is executed (or ScenarioOutline scenarios)."""
|
|
134
134
|
self._finish_scenario()
|
|
135
|
+
# Set after CONFIG.restore() in environment.before_scenario()
|
|
136
|
+
CONFIG["FEATURE_RUN_ID"] = scenario.feature.feature_run_id
|
|
135
137
|
|
|
136
138
|
self.this_scenario = scenario
|
|
137
139
|
self.this_steps = []
|
|
@@ -139,7 +141,9 @@ class RundbFormatter(Formatter):
|
|
|
139
141
|
scenario_run_id_seed = (
|
|
140
142
|
f"{scenario.feature.feature_run_id}_{time.perf_counter()}"
|
|
141
143
|
)
|
|
142
|
-
scenario.scenario_run_id =
|
|
144
|
+
CONFIG["SCENARIO_RUN_ID"] = scenario.scenario_run_id = (
|
|
145
|
+
generate_short_id(scenario_run_id_seed)
|
|
146
|
+
)
|
|
143
147
|
scenario.custom_data = {}
|
|
144
148
|
|
|
145
149
|
# feature.scenarios is a mix of Scenario and ScenarioOutline objects with their own scenarios list
|
|
@@ -97,6 +97,7 @@ def find(
|
|
|
97
97
|
str(index),
|
|
98
98
|
str(direction.value),
|
|
99
99
|
name_within_thing,
|
|
100
|
+
"true"
|
|
100
101
|
]
|
|
101
102
|
|
|
102
103
|
def execute_fuzzy_find():
|
|
@@ -104,4 +105,9 @@ def find(
|
|
|
104
105
|
script = f"return cucu.fuzzy_find({','.join(args)});"
|
|
105
106
|
return browser.execute(script)
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
fuzzy_return = search_in_all_frames(browser, execute_fuzzy_find)
|
|
109
|
+
if fuzzy_return is None:
|
|
110
|
+
logger.info("Fuzzy found no element.")
|
|
111
|
+
return None
|
|
112
|
+
logger.info("Fuzzy found element by search term {}".format(fuzzy_return[1]))
|
|
113
|
+
return fuzzy_return[0]
|
|
@@ -54,13 +54,15 @@
|
|
|
54
54
|
things,
|
|
55
55
|
index=0,
|
|
56
56
|
direction=LEFT_TO_RIGHT,
|
|
57
|
-
name_within_thing=false
|
|
57
|
+
name_within_thing=false,
|
|
58
|
+
insert_label=false) {
|
|
58
59
|
var elements = [];
|
|
60
|
+
var element_labels = [];
|
|
59
61
|
var results = null;
|
|
60
62
|
var attributes = ['aria-label', 'title', 'placeholder', 'value'];
|
|
61
63
|
var matchers = ['has_text', 'contains'];
|
|
62
64
|
|
|
63
|
-
name = name.replaceAll('"', '\\"')
|
|
65
|
+
name = name.replaceAll('"', '\\"');
|
|
64
66
|
|
|
65
67
|
/*
|
|
66
68
|
* try to match on exact text but ultimately fall back to matching on
|
|
@@ -75,24 +77,27 @@
|
|
|
75
77
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
76
78
|
var thing = things[tIndex];
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (cucu.debug) { console.log('<thing>name</thing>', results); }
|
|
80
|
+
var nameInTagContentLabel = `<${thing}>${name}</${thing}>`;
|
|
81
|
+
var nameInTagContentJq = `${thing}:vis:${matcher}("${name}")`;
|
|
82
|
+
results = jqCucu(nameInTagContentJq, document.body).toArray();
|
|
83
|
+
if (cucu.debug) { console.log(nameInTagContentLabel, results); }
|
|
83
84
|
elements = elements.concat(results);
|
|
85
|
+
element_labels = element_labels.concat(results.map(x => nameInTagContentLabel));
|
|
84
86
|
|
|
85
|
-
// <thing attribute="name"></thing>
|
|
86
87
|
for(var aIndex=0; aIndex < attributes.length; aIndex++) {
|
|
87
88
|
var attribute_name = attributes[aIndex];
|
|
89
|
+
var nameIsAttributeLabel = `<${thing} attribute="${attribute_name}"></${thing}>`;
|
|
88
90
|
if (matcher == 'has_text') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
var nameIsAttributeJq = `${thing}[${attribute_name}="${name}"]:vis`;
|
|
92
|
+
results = jqCucu(nameIsAttributeJq, document.body).toArray();
|
|
93
|
+
if (cucu.debug) { console.log(nameIsAttributeLabel, results); }
|
|
91
94
|
} else if (matcher == 'contains') {
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
var nameInAttributeJq = `${thing}[${attribute_name}*="${name}"]:vis`;
|
|
96
|
+
results = jqCucu(nameInAttributeJq, document.body).toArray();
|
|
97
|
+
if (cucu.debug) { console.log(nameIsAttributeLabel, results); }
|
|
94
98
|
}
|
|
95
99
|
elements = elements.concat(results);
|
|
100
|
+
element_labels = element_labels.concat(results.map(x => nameIsAttributeLabel));
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -107,38 +112,44 @@
|
|
|
107
112
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
108
113
|
var thing = things[tIndex];
|
|
109
114
|
|
|
110
|
-
// <thing value="name"></thing>
|
|
111
115
|
if (matcher == 'has_text') {
|
|
112
|
-
|
|
116
|
+
var nameIsValueLabel = `${thing} value="${name}"></${thing}>`;
|
|
117
|
+
var nameIsValueJq = `${thing}:vis`;
|
|
118
|
+
results = jqCucu(nameInValueJq, document.body).filter(function(){
|
|
113
119
|
return this.value == name;
|
|
114
120
|
}).toArray();
|
|
115
|
-
if (cucu.debug) { console.log(
|
|
121
|
+
if (cucu.debug) { console.log(nameIsValueLabel, results); }
|
|
116
122
|
} else if (matcher == 'contains') {
|
|
117
|
-
|
|
123
|
+
var nameInValueLabel = `${thing} value*="${name}"></${thing}>`;
|
|
124
|
+
var nameInValueJq = `${thing}:vis`;
|
|
125
|
+
results = jqCucu(nameInValueJq, document.body).filter(function(){
|
|
118
126
|
return this.value !== undefined && String(this.value).indexOf(name) != -1;
|
|
119
127
|
}).toArray();
|
|
120
|
-
if (cucu.debug) { console.log(
|
|
128
|
+
if (cucu.debug) { console.log(nameInValueLabel, results); }
|
|
121
129
|
}
|
|
122
130
|
elements = elements.concat(results);
|
|
131
|
+
element_labels = element_labels.concat(results.map(x => nameInValueLabel));
|
|
123
132
|
}
|
|
124
133
|
|
|
125
134
|
/*
|
|
126
135
|
* element labeled by another using the for/id attributes
|
|
127
136
|
*/
|
|
128
|
-
var
|
|
137
|
+
var labelForNameJq = `*[for]:vis:${matcher}("${name}")`
|
|
138
|
+
var labels = jqCucu(labelForNameJq, document.body).toArray();
|
|
129
139
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
130
140
|
var thing = things[tIndex];
|
|
131
141
|
results = [];
|
|
132
142
|
|
|
133
|
-
|
|
134
|
-
* <* for=...>name</*>...<thing id=...></thing>
|
|
135
|
-
*/
|
|
143
|
+
var labelForNameLabel = `<* for=...>${name}</*>...<${thing} id=...></${thing}>`;
|
|
136
144
|
for(var lIndex=0; lIndex < labels.length; lIndex++) {
|
|
137
145
|
var label = labels[lIndex];
|
|
138
146
|
var id = label.getAttribute('for');
|
|
139
|
-
|
|
140
|
-
|
|
147
|
+
var idMatchesForLabelJq = `${thing}[id="${id}"]:vis`;
|
|
148
|
+
results = jqCucu(idMatchesForLabelJq, document.body).toArray();
|
|
149
|
+
|
|
150
|
+
if (cucu.debug) { console.log(labelForNameLabel, results); }
|
|
141
151
|
elements = elements.concat(results);
|
|
152
|
+
element_labels = element_labels.concat(results.map(x => labelForNameLabel));
|
|
142
153
|
}
|
|
143
154
|
}
|
|
144
155
|
|
|
@@ -148,19 +159,23 @@
|
|
|
148
159
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
149
160
|
var thing = things[tIndex];
|
|
150
161
|
|
|
151
|
-
|
|
152
|
-
* <thing><*>...name...</*></thing>
|
|
153
|
-
*/
|
|
162
|
+
var nameInNestedChildLabel = `<${thing}><*>...${name}...</*></${thing}>`;
|
|
154
163
|
results = jqCucu('*:vis:' + matcher + '("' + name + '")', document.body).parents(thing).toArray();
|
|
155
|
-
if (cucu.debug) { console.log(
|
|
164
|
+
if (cucu.debug) { console.log(nameInNestedChildLabel, results); }
|
|
156
165
|
elements = elements.concat(results);
|
|
166
|
+
if (results.length > 0) {
|
|
167
|
+
console.log('!*!*!* Found element labeled by nested child!');
|
|
168
|
+
console.log(`!*!*!* elements: ${elements}`);
|
|
169
|
+
}
|
|
170
|
+
element_labels = element_labels.concat(results.map(x => nameInNestedChildLabel));
|
|
157
171
|
|
|
158
|
-
// <thing><* attribute="name"></*></thing>
|
|
159
172
|
for(var aIndex=0; aIndex < attributes.length; aIndex++) {
|
|
160
173
|
var attribute_name = attributes[aIndex];
|
|
161
|
-
|
|
162
|
-
|
|
174
|
+
var innerNestedElementsLabel = `<${thing}><* ${attribute_name}="${name}"></*></${thing}>`;
|
|
175
|
+
results = jqCucu(`*:vis[${attribute_name}="${name}"]`, document.body).parents(thing).toArray();
|
|
176
|
+
if (cucu.debug) { console.log(innerNestedElementsLabel, results); }
|
|
163
177
|
elements = elements.concat(results);
|
|
178
|
+
element_labels = element_labels.concat(results.map(x => innerNestedElementsLabel));
|
|
164
179
|
}
|
|
165
180
|
}
|
|
166
181
|
|
|
@@ -174,10 +189,11 @@
|
|
|
174
189
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
175
190
|
var thing = things[tIndex];
|
|
176
191
|
|
|
177
|
-
|
|
178
|
-
results = jqCucu(
|
|
179
|
-
if (cucu.debug) { console.log(
|
|
192
|
+
var nameIsPreviousSiblingLabel = `<*>${name}</*><${thing}/>`;
|
|
193
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).next(thing + ':vis').toArray();
|
|
194
|
+
if (cucu.debug) { console.log(nameIsPreviousSiblingLabel, results); }
|
|
180
195
|
elements = elements.concat(results);
|
|
196
|
+
element_labels = element_labels.concat(results.map(x => nameIsPreviousSiblingLabel));
|
|
181
197
|
}
|
|
182
198
|
}
|
|
183
199
|
|
|
@@ -186,10 +202,11 @@
|
|
|
186
202
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
187
203
|
var thing = things[tIndex];
|
|
188
204
|
|
|
189
|
-
|
|
190
|
-
results = jqCucu(
|
|
191
|
-
if (cucu.debug) { console.log(
|
|
205
|
+
var nameIsNextSiblingLabel = `<${thing}/><*>${name}</*>`;
|
|
206
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).prev(thing).toArray();
|
|
207
|
+
if (cucu.debug) { console.log(nameIsNextSiblingLabel, results); }
|
|
192
208
|
elements = elements.concat(results);
|
|
209
|
+
element_labels = element_labels.concat(results.map(x => nameIsNextSiblingLabel));
|
|
193
210
|
}
|
|
194
211
|
}
|
|
195
212
|
|
|
@@ -199,12 +216,11 @@
|
|
|
199
216
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
200
217
|
var thing = things[tIndex];
|
|
201
218
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
results = jqCucu('*:vis:' + matcher + '("' + name + '")', document.body).children(thing + ':vis').toArray();
|
|
206
|
-
if (cucu.debug) { console.log('<*><thing></thing>name</*>', results); }
|
|
219
|
+
var nameIsTextSiblingLabel = `<*><${thing}></${thing}>${name}</*>`;
|
|
220
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).children(thing + ':vis').toArray();
|
|
221
|
+
if (cucu.debug) { console.log(nameIsTextSiblingLabel, results); }
|
|
207
222
|
elements = elements.concat(results);
|
|
223
|
+
element_labels = element_labels.concat(results.map(x => nameIsTextSiblingLabel));
|
|
208
224
|
}
|
|
209
225
|
|
|
210
226
|
// element labeled with any previous sibling
|
|
@@ -212,17 +228,19 @@
|
|
|
212
228
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
213
229
|
var thing = things[tIndex];
|
|
214
230
|
|
|
215
|
-
|
|
216
|
-
results = jqCucu(
|
|
217
|
-
if (cucu.debug) { console.log(
|
|
231
|
+
var leftToRightLabel = `<*>${name}</*>...<${thing}>...`;
|
|
232
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).nextAll(thing + ':vis').toArray();
|
|
233
|
+
if (cucu.debug) { console.log(leftToRightLabel, results); }
|
|
218
234
|
elements = elements.concat(results);
|
|
235
|
+
element_labels = element_labels.concat(results.map(x => leftToRightLabel));
|
|
219
236
|
|
|
220
|
-
|
|
237
|
+
var leftToRightGrandpaLabel = `<...><*>${name}</*></...>...<...><${thing}></...>`;
|
|
221
238
|
// XXX: this rule is horribly complicated and I'd rather see it gone
|
|
222
239
|
// basically: common great grandpranet
|
|
223
|
-
results = jqCucu(
|
|
224
|
-
if (cucu.debug) { console.log(
|
|
240
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).nextAll().find(thing + ':vis').toArray();
|
|
241
|
+
if (cucu.debug) { console.log(leftToRightGrandpaLabel, results); }
|
|
225
242
|
elements = elements.concat(results);
|
|
243
|
+
element_labels = element_labels.concat(results.map(x => leftToRightGrandpaLabel));
|
|
226
244
|
}
|
|
227
245
|
}
|
|
228
246
|
|
|
@@ -231,22 +249,29 @@
|
|
|
231
249
|
for(var tIndex = 0; tIndex < things.length; tIndex++) {
|
|
232
250
|
var thing = things[tIndex];
|
|
233
251
|
|
|
234
|
-
|
|
235
|
-
results = jqCucu(
|
|
236
|
-
if (cucu.debug) { console.log(
|
|
252
|
+
var rightToLeftLabel = `<${thing}>...<*>${name}</*>...`;
|
|
253
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).prevAll(thing).toArray();
|
|
254
|
+
if (cucu.debug) { console.log(rightToLeftLabel, results); }
|
|
237
255
|
elements = elements.concat(results);
|
|
256
|
+
element_labels = element_labels.concat(results.map(x => rightToLeftLabel));
|
|
238
257
|
|
|
239
|
-
|
|
258
|
+
var rightToLeftGrandpaLabel = `<...><${thing}></...>...<...><*>${name}</*></...>`;
|
|
240
259
|
// XXX: this rule is horribly complicated and I'd rather see it gone
|
|
241
|
-
results = jqCucu(
|
|
242
|
-
if (cucu.debug) { console.log(
|
|
260
|
+
results = jqCucu(`*:vis:${matcher}("${name}")`, document.body).prevAll().find(thing + ':vis').toArray();
|
|
261
|
+
if (cucu.debug) { console.log(rightToLeftGrandpaLabel, results); }
|
|
243
262
|
elements = elements.concat(results);
|
|
263
|
+
element_labels = element_labels.concat(results.map(x => rightToLeftGrandpaLabel));
|
|
244
264
|
}
|
|
245
265
|
}
|
|
246
266
|
}
|
|
247
267
|
|
|
248
268
|
if (cucu.debug) {
|
|
249
269
|
console.log(elements);
|
|
270
|
+
console.log(element_labels);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (elements.length > 0 && insert_label) {
|
|
274
|
+
return [elements[index], element_labels[index]];
|
|
250
275
|
}
|
|
251
276
|
return elements[index];
|
|
252
277
|
};
|
|
@@ -87,6 +87,9 @@
|
|
|
87
87
|
{% endif %}
|
|
88
88
|
{% if step['result'] is defined %}
|
|
89
89
|
{% set step_status = step['result']['status'] %}
|
|
90
|
+
{% if step['result']['status'] == 'skipped' %}
|
|
91
|
+
{% set step_status = 'untested' %}
|
|
92
|
+
{% endif %}
|
|
90
93
|
{% if step['result']['status'] in ('failed', 'passed') and step["result"]["timestamp"] %}
|
|
91
94
|
{% set step_timing = "{} for {:.3f}s".format(step["result"]["timestamp"].strftime("%H:%M:%S"), step["result"]["duration"]) %}
|
|
92
95
|
{% set step_start = step["result"]["timestamp"] %}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|