Skip to content

Commit

Permalink
fix(csv-parser-orders): Add actualTransitionDate to lineitem (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
vineet kumar authored Sep 14, 2020
1 parent 707007d commit f5f9fe4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ module.exports = {
'/integration-tests/',
'/packages/.*/node_modules',
'/packages/.*/dist',
'/packages/.*/li',
'/packages/.*/lib',
],
}
4 changes: 4 additions & 0 deletions packages/csv-parser-orders/src/parsers/line-item-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export default class LineItemStateParser extends AbstractParser {
toState: data.toState,
}

if (data.actualTransitionDate) {
state.actualTransitionDate = data.actualTransitionDate
}

if (data._fromStateQty)
state._fromStateQty = parseInt(data._fromStateQty, 10)

Expand Down
3 changes: 3 additions & 0 deletions packages/csv-parser-orders/test/line-item-state.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe('LineItemStateParser', () => {
fromState: 'order',
toState: 'shipped',
_fromStateQty: 100,
actualTransitionDate: '2016-11-01T08:01:19+0000',
},
],
},
Expand Down Expand Up @@ -128,6 +129,7 @@ describe('LineItemStateParser', () => {
fromState: 'picking',
quantity: 1,
toState: 'picked',
actualTransitionDate: '2017-11-14T14:17:18+01:00',
},
],
},
Expand All @@ -139,6 +141,7 @@ describe('LineItemStateParser', () => {
fromState: 'open',
quantity: 1,
toState: 'picking',
actualTransitionDate: '2017-11-14T14:17:18+01:00',
},
],
},
Expand Down

0 comments on commit f5f9fe4

Please sign in to comment.