@projectcaluma/ember-testing 11.0.0-beta.24 → 11.0.0-beta.27

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.
@@ -31,16 +31,21 @@ export default class WorkItemMock extends BaseMock {
31
31
  handleRedoWorkItem(_, { input }) {
32
32
  const { id } = deserialize(input);
33
33
  const workItem = this.collection.find(id);
34
+ const caseId = workItem?.childCaseId;
34
35
 
35
36
  if (workItem.taskId === "distribution") {
36
- const caseId = workItem.childCaseId;
37
-
38
37
  this.collection
39
38
  .where({ caseId, taskId: "complete-distribution" })
40
39
  .update({ status: "READY" });
41
40
  this.collection
42
41
  .where({ caseId, taskId: "create-inquiry" })
43
42
  .update({ status: "READY" });
43
+ } else if (workItem.taskId === "inquiry") {
44
+ this.server.create("work-item", {
45
+ caseId,
46
+ status: "READY",
47
+ taskId: "adjust-inquiry-answer",
48
+ });
44
49
  }
45
50
 
46
51
  return this.handleSavePayload.fn.call(this, _, {
@@ -81,7 +86,7 @@ export default class WorkItemMock extends BaseMock {
81
86
  .update({ status: "CANCELED" });
82
87
  this.collection
83
88
  .findBy({ childCaseId: caseId })
84
- .update({ status: "COMPLETED" });
89
+ .update({ status: "COMPLETED", isRedoable: true });
85
90
  this.schema.cases.find(caseId).update({ status: "COMPLETED" });
86
91
  } else if (taskId === "revise-inquiry-answer") {
87
92
  this.collection
@@ -193,7 +193,7 @@ export function answerInquiry(server, { inquiry, status, reason, hint }) {
193
193
  }
194
194
 
195
195
  export function confirmInquiry({ inquiry }) {
196
- inquiry.update({ status: "COMPLETED" });
196
+ inquiry.update({ status: "COMPLETED", isRedoable: true });
197
197
  inquiry.childCase.update({
198
198
  status: "COMPLETED",
199
199
  closedAt: faker.date.recent(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-testing",
3
- "version": "11.0.0-beta.24",
3
+ "version": "11.0.0-beta.27",
4
4
  "description": "Ember addon for testing with Caluma addons.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@ember/string": "^3.0.0",
18
- "@faker-js/faker": "^7.4.0",
18
+ "@faker-js/faker": "^7.5.0",
19
19
  "broccoli-funnel": "^3.0.8",
20
20
  "broccoli-merge-trees": "^4.2.0",
21
21
  "ember-apollo-client": "~4.0.2",
@@ -28,7 +28,7 @@
28
28
  "graphql": "^15.8.0",
29
29
  "graphql-iso-date": "^3.6.1",
30
30
  "graphql-tools": "^4.0.8",
31
- "luxon": "^3.0.1",
31
+ "luxon": "^3.0.3",
32
32
  "miragejs": "^0.1.45"
33
33
  },
34
34
  "devDependencies": {