diff --git a/.changeset/nice-ears-grin.md b/.changeset/nice-ears-grin.md new file mode 100644 index 000000000..75bff9b14 --- /dev/null +++ b/.changeset/nice-ears-grin.md @@ -0,0 +1,5 @@ +--- +'@commercetools-test-data/commons': patch +--- + +Adds staged quote key reference preset diff --git a/models/commons/src/key-reference/presets/product-type-reference.spec.ts b/models/commons/src/key-reference/presets/product-type-reference.spec.ts index 2bc6be791..06674133a 100644 --- a/models/commons/src/key-reference/presets/product-type-reference.spec.ts +++ b/models/commons/src/key-reference/presets/product-type-reference.spec.ts @@ -1,7 +1,7 @@ import type { TKeyReference } from '../types'; import productTypeReference from './product-type-reference'; -it('should build category reference', () => { +it('should build product type reference', () => { const built = productTypeReference().build(); expect(built).toEqual({ key: expect.any(String), diff --git a/models/commons/src/key-reference/presets/shipping-method-reference.spec.ts b/models/commons/src/key-reference/presets/shipping-method-reference.spec.ts index b7d01818e..62120798f 100644 --- a/models/commons/src/key-reference/presets/shipping-method-reference.spec.ts +++ b/models/commons/src/key-reference/presets/shipping-method-reference.spec.ts @@ -1,7 +1,7 @@ import type { TKeyReference } from '../types'; import shippingMethodReference from './shipping-method-reference'; -it('should build category reference', () => { +it('should build shipping method reference', () => { const built = shippingMethodReference().build(); expect(built).toEqual({ key: expect.any(String), diff --git a/models/commons/src/key-reference/presets/staged-quote-reference.spec.ts b/models/commons/src/key-reference/presets/staged-quote-reference.spec.ts new file mode 100644 index 000000000..21aefda85 --- /dev/null +++ b/models/commons/src/key-reference/presets/staged-quote-reference.spec.ts @@ -0,0 +1,10 @@ +import type { TKeyReference } from '../types'; +import stagedQuote from './staged-quote-reference'; + +it('should build staged quote reference', () => { + const built = stagedQuote().build(); + expect(built).toEqual({ + key: expect.any(String), + typeId: 'staged-quote', + }); +}); diff --git a/models/commons/src/key-reference/presets/staged-quote-reference.ts b/models/commons/src/key-reference/presets/staged-quote-reference.ts new file mode 100644 index 000000000..b57d27220 --- /dev/null +++ b/models/commons/src/key-reference/presets/staged-quote-reference.ts @@ -0,0 +1,7 @@ +import KeyReference from '../builder'; +import type { TKeyReferenceBuilder } from '../types'; + +const stagedQuote = (): TKeyReferenceBuilder => + KeyReference().typeId('staged-quote'); + +export default stagedQuote; diff --git a/models/commons/src/key-reference/presets/tax-category-reference.spec.ts b/models/commons/src/key-reference/presets/tax-category-reference.spec.ts index 2d1ce7b70..e20ca99d6 100644 --- a/models/commons/src/key-reference/presets/tax-category-reference.spec.ts +++ b/models/commons/src/key-reference/presets/tax-category-reference.spec.ts @@ -1,7 +1,7 @@ import type { TKeyReference } from '../types'; import taxCategoryReference from './tax-category-reference'; -it('should build category reference', () => { +it('should build tax category reference', () => { const built = taxCategoryReference().build(); expect(built).toEqual({ key: expect.any(String),