Created
December 17, 2019 18:42
-
-
Save fisher6/d80b9e935eb92e6267eadf8a88a20aa6 to your computer and use it in GitHub Desktop.
Intacct failed tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PASS tests/xometry/order.test.js | |
PASS tests/event_handlers/customer_advance.test.js | |
PASS tests/event_handlers/create_sales_order.test.js | |
FAIL tests/event_handlers/create_sales_invoice.test.js | |
● createSalesInvoice › when everything needs to be invoiced | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when everything needs to be invoiced: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:266:9) | |
● createSalesInvoice › when some parts need to be invoiced | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when some parts need to be invoiced: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,10 +30,20 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
</sotransitems> | |
</create_sotransaction> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:483:9) | |
● createSalesInvoice › when multiple payments are applied toward the invoice | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when multiple payments are applied toward the invoice: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -29,20 +29,40 @@ | |
<quantity>100</quantity> | |
<unit>Each</unit> | |
<price>123.45</price> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:672:9) | |
● createSalesInvoice › when multiple parts are invoiced, the invoice date is the latest ship date | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when multiple parts are invoiced, the invoice date is the latest ship date: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:836:9) | |
● createSalesInvoice › when the sales order isn't converted properly | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when the sales order isn't converted properly: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:1167:9) | |
› 5 snapshots failed. | |
PASS tests/intacct/transaction.test.js | |
FAIL tests/event_handlers/purchase_order.test.js | |
● createPurchaseOrder › works | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Job.toTransaction (src/xometry/job.js:38:25) | |
at Object.createPurchaseOrder (src/event_handlers/purchase_order.js:23:33) | |
› 2 snapshots obsolete. | |
• createPurchaseOrder works: OrderEntryTransactionCreate (purchase order) 1 | |
• createPurchaseOrder works: XML for querying whether a PO with the same job ID already exists 1 | |
FAIL tests/xometry/job.test.js | |
● Job › toTransaction › matches snapshot | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Job.toTransaction (src/xometry/job.js:38:25) | |
at Object.test (tests/xometry/job.test.js:63:24) | |
● Job › Line items on a purchase order have right quantites and price › All items has price 0 except last one has price of job accepted price | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Object.test (tests/xometry/job.test.js:81:31) | |
● Job › Line items on a purchase order have right quantites and price › All line items has quantity 1 | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Object.test (tests/xometry/job.test.js:100:31) | |
PASS tests/event_handlers/customer.test.js | |
PASS tests/intacct/contact.test.js | |
PASS tests/intacct/timeZonePatches.test.js | |
PASS tests/event_handlers/vendor.test.js | |
PASS tests/event_handlers/outsource_ordered_part.test.js | |
PASS tests/xometry/user.test.js | |
PASS tests/intacct/query_helpers.test.js | |
PASS tests/event_handlers/cancel_transaction.test.js | |
PASS tests/index.test.js | |
PASS tests/utilities/index.test.js | |
PASS ../queue_consumer/tests/handler.test.js | |
PASS tests/intacct/payment.test.js | |
PASS tests/event_handlers/index.test.js | |
PASS tests/intacct/project.test.js | |
Summary of all failing tests | |
FAIL tests/event_handlers/create_sales_invoice.test.js | |
● createSalesInvoice › when everything needs to be invoiced | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when everything needs to be invoiced: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:266:9) | |
● createSalesInvoice › when some parts need to be invoiced | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when some parts need to be invoiced: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,10 +30,20 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
</sotransitems> | |
</create_sotransaction> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:483:9) | |
● createSalesInvoice › when multiple payments are applied toward the invoice | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when multiple payments are applied toward the invoice: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -29,20 +29,40 @@ | |
<quantity>100</quantity> | |
<unit>Each</unit> | |
<price>123.45</price> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:672:9) | |
● createSalesInvoice › when multiple parts are invoiced, the invoice date is the latest ship date | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when multiple parts are invoiced, the invoice date is the latest ship date: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:836:9) | |
● createSalesInvoice › when the sales order isn't converted properly | |
expect(received).toMatchSnapshot(hint) | |
Snapshot name: `createSalesInvoice when the sales order isn't converted properly: xml for creating sales invoice 1` | |
- Snapshot | |
+ Received | |
@@ -30,21 +30,41 @@ | |
<unit>Each</unit> | |
<price>123.45</price> | |
<sourcelinekey>122</sourcelinekey> | |
<locationid>E-100</locationid> | |
<memo>00AAAAA--aaaaaaa</memo> | |
- <projectid>00001-12345</projectid> | |
- <classid>LB-100</classid> | |
- </sotransitem> | |
- <sotransitem> | |
- <itemid>PJ</itemid> | |
- <quantity>100</quantity> | |
- <unit>Each</unit> | |
- <price>123.45</price> | |
- <sourcelinekey>133</sourcelinekey> | |
- <locationid>E-100</locationid> | |
- <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
+ <projectid>00001-12345</projectid> | |
+ <classid>LB-100</classid> | |
+ </sotransitem> | |
+ <sotransitem> | |
+ <itemid>PJ</itemid> | |
+ <quantity>100</quantity> | |
+ <unit>Each</unit> | |
+ <price>123.45</price> | |
+ <sourcelinekey>133</sourcelinekey> | |
+ <locationid>E-100</locationid> | |
+ <memo>00BBBBB--bbbbbbb</memo> | |
+ <customfields> | |
+ <customfield> | |
+ <customfieldname>CUSTOMER_FILE_NAME</customfieldname> | |
+ <customfieldvalue>file2.stp</customfieldvalue> | |
+ </customfield> | |
+ <customfield> | |
+ <customfieldname /> | |
+ <customfieldvalue /> | |
+ </customfield> | |
+ </customfields> | |
<projectid>00001-12345</projectid> | |
<classid>LB-100</classid> | |
</sotransitem> | |
<sotransitem> | |
<itemid>CERTS</itemid> | |
64 | redactControlId: true | |
65 | }) | |
> 66 | expect(xml).toMatchSnapshot(snapshots[idx]) | |
| ^ | |
67 | }) | |
68 | expect(fn).toBeCalledTimes(snapshots.length) | |
69 | }, | |
at forEach (tests/__helpers__/index.js:66:25) | |
at Array.forEach (<anonymous>) | |
at expectIntacctCallsToMatchSnapshots (tests/__helpers__/index.js:61:23) | |
at Object.test (tests/event_handlers/create_sales_invoice.test.js:1167:9) | |
FAIL tests/event_handlers/purchase_order.test.js | |
● createPurchaseOrder › works | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Job.toTransaction (src/xometry/job.js:38:25) | |
at Object.createPurchaseOrder (src/event_handlers/purchase_order.js:23:33) | |
FAIL tests/xometry/job.test.js | |
● Job › toTransaction › matches snapshot | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Job.toTransaction (src/xometry/job.js:38:25) | |
at Object.test (tests/xometry/job.test.js:63:24) | |
● Job › Line items on a purchase order have right quantites and price › All items has price 0 except last one has price of job accepted price | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Object.test (tests/xometry/job.test.js:81:31) | |
● Job › Line items on a purchase order have right quantites and price › All line items has quantity 1 | |
RangeError: "NaN" is not a number | |
51 | const num = +string | |
52 | if (isNaN(num)) { | |
> 53 | throw RangeError(`"${string}" is not a number`) | |
| ^ | |
54 | } | |
55 | return num | |
56 | } | |
at SafeNumber (src/utilities/index.js:53:15) | |
at reduce (src/xometry/job.js:57:106) | |
at Array.reduce (<anonymous>) | |
at Job.transactionLines (src/xometry/job.js:57:58) | |
at Object.test (tests/xometry/job.test.js:100:31) | |
Snapshot Summary | |
› 5 snapshots failed from 1 test suite. Inspect your code changes or press `u` to update them. | |
› 2 snapshots obsolete from 1 test suite. To remove them all, press `u`. | |
↳ tests/event_handlers/purchase_order.test.js | |
• createPurchaseOrder works: OrderEntryTransactionCreate (purchase order) 1 | |
• createPurchaseOrder works: XML for querying whether a PO with the same job ID already exists 1 | |
Test Suites: 3 failed, 18 passed, 21 total | |
Tests: 9 failed, 99 passed, 108 total | |
Snapshots: 5 failed, 2 obsolete, 131 passed, 136 total | |
Time: 7.749s | |
Ran all test suites. | |
Watch Usage: Press w to show more. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment