@suffolklitlab/alkiln 5.10.2 → 5.10.4

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 CHANGED
@@ -45,6 +45,22 @@ Format:
45
45
 
46
46
  <!-- ## [Unreleased] -->
47
47
 
48
+ ## [5.10.4] - 2024-03-25
49
+
50
+ ### Fixed
51
+
52
+ - Fixes text fields did not get cleared before entering new text. Created problems with text fields that had pre-existing answers, like default answers.
53
+
54
+ ## [5.10.3] - 2024-03-23
55
+
56
+ ### Fixed
57
+
58
+ - Fixes undefined var name when setting long text or ajax combobox value
59
+
60
+ ### Internal
61
+
62
+ - Removes test for text on error pages. That keeps changing every now and then. It would be nice to test that we're catching some text, which we can't do right now. Maybe we should be broader with where we get the text since authors can also change the DOM. At least there are screenshots when possible.
63
+
48
64
  ## [5.10.2] - 2024-02-29
49
65
 
50
66
  ### Fixed
package/lib/scope.js CHANGED
@@ -1979,13 +1979,16 @@ module.exports = {
1979
1979
  const typing_cutoff = 300;
1980
1980
  const slice_value = -3;
1981
1981
 
1982
+ // Deleting preexisting text here is slower, but more clear and maintainable
1983
+ await handle.evaluate(( elem ) => { elem.value = ``; });
1984
+
1982
1985
  let is_ajax = await handle.evaluate(( elem, text, typing_cutoff, slice_value ) => {
1983
1986
  // For long strings or ajax comboboxes, set the value of the field to
1984
1987
  // most of the text. This will be faster in those cases.
1985
1988
  is_ajax = elem.className.includes(`da-ajax-combobox`);
1986
1989
 
1987
1990
  if ( is_ajax || text.length > typing_cutoff ) {
1988
- elem.value = answer.slice(0, slice_value); // .slice(0, -3)
1991
+ elem.value = text.slice(0, slice_value); // .slice(0, -3)
1989
1992
  }
1990
1993
 
1991
1994
  return is_ajax;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.10.2",
3
+ "version": "5.10.4",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {