@suffolklitlab/alkiln 5.9.0-feat-url7 → 5.9.0-feat-url8
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.
- package/lib/scope.js +8 -2
- package/package.json +1 -1
package/lib/scope.js
CHANGED
|
@@ -1778,7 +1778,9 @@ module.exports = {
|
|
|
1778
1778
|
// Authors should enter the time like 12:34 PM, but we shouldn't type ":", space, or M.
|
|
1779
1779
|
let answer_time = answer.replace(":", "").replace(" ", "").replace("M", "");
|
|
1780
1780
|
await handle.focus();
|
|
1781
|
-
|
|
1781
|
+
let delay = 0;
|
|
1782
|
+
if ( session_vars.get_debug() ) { delay = 25; }
|
|
1783
|
+
await handle.type( answer, { delay });
|
|
1782
1784
|
await handle.press(`Enter`);
|
|
1783
1785
|
await scope.afterStep(scope, { waitForShowIf: true });
|
|
1784
1786
|
} else {
|
|
@@ -1954,7 +1956,9 @@ module.exports = {
|
|
|
1954
1956
|
// Set text in some kind of field (input text, input date, textarea, etc.)
|
|
1955
1957
|
await handle.evaluate( el => { el.value = '' });
|
|
1956
1958
|
await handle.focus();
|
|
1957
|
-
|
|
1959
|
+
let delay = 0;
|
|
1960
|
+
if ( session_vars.get_debug() ) { delay = 25; }
|
|
1961
|
+
await handle.type( answer, { delay });
|
|
1958
1962
|
},
|
|
1959
1963
|
|
|
1960
1964
|
draw_signature: async function ( scope, name ) {
|
|
@@ -2080,6 +2084,8 @@ module.exports = {
|
|
|
2080
2084
|
} // ends for every non-submit-button field on the page
|
|
2081
2085
|
} // ends while fields are still being set
|
|
2082
2086
|
|
|
2087
|
+
if ( session_vars.get_debug() ) { await scope.page.waitForTimeout(2000); }
|
|
2088
|
+
|
|
2083
2089
|
// Press a continue button with a story table variable name if it exists
|
|
2084
2090
|
let did_navigate = false;
|
|
2085
2091
|
let error = {};
|
package/package.json
CHANGED