@suffolklitlab/alkiln 5.9.0-feat-url9 → 5.10.0-fix-typing1
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/CHANGELOG.md +11 -2
- package/lib/scope.js +9 -4
- package/package.json +1 -1
- package/tests/unit_tests/getAllFields.test.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -45,19 +45,28 @@ Format:
|
|
|
45
45
|
|
|
46
46
|
## [Unreleased]
|
|
47
47
|
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- Fixes the issue that typing is too fast for some fields, like Ajax comboboxes. See [#857](https://github.com/SuffolkLITLab/ALKiln/issues/857).
|
|
51
|
+
|
|
52
|
+
## [5.10.0] - 2024-02-22
|
|
53
|
+
|
|
48
54
|
### Added
|
|
49
55
|
|
|
50
56
|
- New Step: 'I go to ""' to go to any arbitrary url, not just arbitrary interview urls.
|
|
51
57
|
- New navigation report messages.
|
|
58
|
+
- Allow non-local environments to get debug logs. For example, the GitHub console during a workflow run.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
52
62
|
- Avoid waiting for "success" on sign in. Not everyone has it.
|
|
53
|
-
- Allow non-local environments to get debug logs.
|
|
54
63
|
- Detect signature page variable names with the trigger variable name as a fallback to the `_save_as` input. If a server's config has its `restrict input variables` value set to `True`, the #trigger value is the only way for ALKiln to know which variable the signature is setting. Add an error to the report if ALKiln is unable to find either of those.
|
|
55
64
|
|
|
56
65
|
### Internal
|
|
57
66
|
|
|
58
67
|
- Handle non-existence of `elem` more robustly when checking for `elem.disabled`
|
|
59
68
|
- Add a pause between pull request tests and push tests when the PR is coming from our own repo
|
|
60
|
-
- Make getting page field values more robust by doing more to ensure that undefined
|
|
69
|
+
- Make getting page field values more robust by doing more to ensure that undefined option `value`s don't cause errors. For example, ajax combobox `select` options don't always have `value`s
|
|
61
70
|
|
|
62
71
|
## [5.9.0] - 2024-02-11
|
|
63
72
|
|
package/lib/scope.js
CHANGED
|
@@ -1976,11 +1976,16 @@ module.exports = {
|
|
|
1976
1976
|
|
|
1977
1977
|
setText: async function ( scope, { handle, answer }) {
|
|
1978
1978
|
// Set text in some kind of field (input text, input date, textarea, etc.)
|
|
1979
|
-
|
|
1979
|
+
// First set the value to part of the string
|
|
1980
|
+
const to_set = answer.slice(0, -3);
|
|
1981
|
+
const to_type = answer.slice(-3);
|
|
1982
|
+
await handle.evaluate(( elem, text ) => {
|
|
1983
|
+
elem.value = text;
|
|
1984
|
+
}, to_set );
|
|
1985
|
+
// Then type the last three characters of the string with a
|
|
1986
|
+
// good pause to let the field register the interaction
|
|
1980
1987
|
await handle.focus();
|
|
1981
|
-
|
|
1982
|
-
if ( session_vars.get_debug() ) { delay = 25; }
|
|
1983
|
-
await handle.type( answer, { delay });
|
|
1988
|
+
await handle.type( to_type, { delay: 100 });
|
|
1984
1989
|
},
|
|
1985
1990
|
|
|
1986
1991
|
draw_signature: async function ( scope, name ) {
|
package/package.json
CHANGED
|
@@ -151,8 +151,6 @@ it(`creates the right data for a dropdown created with an object`, async functio
|
|
|
151
151
|
// Ajax
|
|
152
152
|
it('creates the right data for an `ajax` combobox', async function() {
|
|
153
153
|
let result = await getAllFields( scope, { html: html.ajax });
|
|
154
|
-
console.log(`=================\n${ JSON.stringify(fields.ajax, null, 2) }`);
|
|
155
|
-
console.log(`-----------------\n${ JSON.stringify(result, null, 2) }`);
|
|
156
154
|
expect( result ).to.deep.equalInAnyOrder(fields.ajax );
|
|
157
155
|
});
|
|
158
156
|
|