Skip to content

Commit

Permalink
fix(order-from-quote-draft): prefer new workflow sans typename
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermorrisford committed Feb 12, 2024
1 parent 0ae3171 commit 17c8c4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions models/order/src/order-from-quote-draft/builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ describe('builder', () => {
version: expect.any(Number),
quote: expect.objectContaining({
typeId: 'quote',
__typename: 'Reference',
}),
quoteStateToAccepted: expect.any(Boolean),
orderNumber: expect.any(String),
Expand All @@ -67,7 +66,6 @@ describe('builder', () => {
orderState: expect.any(String),
state: expect.objectContaining({
typeId: 'state',
__typename: 'Reference',
}),
})
)
Expand Down
6 changes: 3 additions & 3 deletions models/order/src/order-from-quote-draft/generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Reference } from '@commercetools-test-data/commons';
import { ReferenceDraft } from '@commercetools-test-data/commons';
import {
fake,
Generator,
Expand All @@ -13,13 +13,13 @@ import { TOrderFromQuoteDraft } from '../types';
const generator = Generator<TOrderFromQuoteDraft>({
fields: {
version: sequence(),
quote: fake(() => Reference.random().typeId('quote')),
quote: fake(() => ReferenceDraft.random().typeId('quote')),
quoteStateToAccepted: fake((f) => f.datatype.boolean()),
orderNumber: fake((f) => String(f.number.int({ min: 100000 }))),
paymentState: oneOf(...Object.values(paymentState)),
shipmentState: oneOf(...Object.values(shipmentState)),
orderState: oneOf(...Object.values(orderState)),
state: fake(() => Reference.random().typeId('state')),
state: fake(() => ReferenceDraft.random().typeId('state')),
},
});

Expand Down

0 comments on commit 17c8c4f

Please sign in to comment.