@projectcaluma/ember-testing 11.0.0-beta.5 → 11.0.0-beta.6

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
@@ -1,3 +1,21 @@
1
+ # [@projectcaluma/ember-testing-v11.0.0-beta.6](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-testing-v11.0.0-beta.5...@projectcaluma/ember-testing-v11.0.0-beta.6) (2022-04-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * **cf-field:** add optional hints for form fields ([d847fbf](https://github.com/projectcaluma/ember-caluma/commit/d847fbffa376ea60971fb9e91aff8bf54ce77d50))
7
+ * **distribution:** enable completing the distribution ([beabe61](https://github.com/projectcaluma/ember-caluma/commit/beabe61bd34025c4785c1e1ba60c59babb3eb6ab))
8
+
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * **cf-field:** Question hints requires Caluma >= v7.15.0
13
+
14
+ Add option to create hints for certain question types. These
15
+ are displayed below the input field and can be used to provide
16
+ short, informative messages. Hints are available for all question
17
+ types except for form, static and action button questions.
18
+
1
19
  # [@projectcaluma/ember-testing-v11.0.0-beta.5](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-testing-v11.0.0-beta.4...@projectcaluma/ember-testing-v11.0.0-beta.5) (2022-03-23)
2
20
 
3
21
 
@@ -29,7 +29,7 @@ export default class BaseFilter {
29
29
  return filters.map(({ key, value, options = {} }) => {
30
30
  const fn = this[key];
31
31
 
32
- return typeof fn === "function"
32
+ return typeof fn === "function" && ![null, undefined].includes(value)
33
33
  ? (records) => fn.call(this, records, value, options)
34
34
  : (records) => records;
35
35
  });
@@ -53,7 +53,7 @@ export default class BaseFilter {
53
53
  }
54
54
 
55
55
  filter(records, filters) {
56
- return this._getFilterFns(filters.filter ?? filters).reduce(
56
+ return this._getFilterFns(filters?.filter ?? filters ?? []).reduce(
57
57
  (recs, fn) => fn(recs),
58
58
  this.sort(records, filters?.order)
59
59
  );
@@ -101,6 +101,14 @@ export default class WorkItemMock extends BaseMock {
101
101
  status: "READY",
102
102
  addressedGroups: workItem.addressedGroups,
103
103
  });
104
+ } else if (taskId === "complete-distribution") {
105
+ this.collection
106
+ .where({ caseId, status: "READY" })
107
+ .update({ status: "CANCELED" });
108
+
109
+ this.collection
110
+ .where({ caseId, status: "SUSPENDED" })
111
+ .update({ status: "CANCELED" });
104
112
  }
105
113
 
106
114
  return this.handleSavePayload.fn.call(this, _, {