chore: Move factories and helpers to a better place (#4551)
* chore: Move factories and helpers to a better place * align factory product variant * fix factory cart * add simple store fac * fix tests * fix tests * fix * fix cart seeder
This commit is contained in:
committed by
GitHub
parent
26e2f81c24
commit
4d326fbbdf
@@ -1,13 +1,15 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const cartSeeder = require("../../../helpers/cart-seeder")
|
||||
const { simpleProductFactory } = require("../../../../api/factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
const cartSeeder = require("../../../../helpers/cart-seeder")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../factories")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const {
|
||||
simpleProductFactory,
|
||||
simpleOrderFactory,
|
||||
} = require("../../../factories")
|
||||
} = require("../../../../factories")
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
describe("Inventory Items endpoints", () => {
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const cartSeeder = require("../../../helpers/cart-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
const {
|
||||
simpleProductFactory,
|
||||
simpleCustomerFactory,
|
||||
} = require("../../../../api/factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
} = require("../../../../factories")
|
||||
const {
|
||||
simpleOrderFactory,
|
||||
simpleRegionFactory,
|
||||
simpleCartFactory,
|
||||
simpleShippingOptionFactory,
|
||||
} = require("../../../factories")
|
||||
const {
|
||||
simpleDiscountFactory,
|
||||
} = require("../../../factories/simple-discount-factory")
|
||||
const draftOrderSeeder = require("../../../../api/helpers/draft-order-seeder")
|
||||
} = require("../../../../factories")
|
||||
const {
|
||||
simpleAddressFactory,
|
||||
} = require("../../../factories/simple-address-factory")
|
||||
} = require("../../../../factories/simple-address-factory")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
const {
|
||||
simpleProductFactory,
|
||||
simpleCustomerFactory,
|
||||
} = require("../../../../api/factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
} = require("../../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../factories")
|
||||
const {
|
||||
simpleOrderFactory,
|
||||
simpleRegionFactory,
|
||||
simpleCartFactory,
|
||||
simpleShippingOptionFactory,
|
||||
} = require("../../../factories")
|
||||
} = require("../../../../factories")
|
||||
|
||||
jest.setTimeout(150000)
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const {
|
||||
ProductVariantInventoryService,
|
||||
ProductVariantService,
|
||||
} = require("@medusajs/medusa")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
|
||||
describe("Create Variant", () => {
|
||||
let appContainer
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
|
||||
describe("Delete Variant", () => {
|
||||
let appContainer
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
|
||||
const {
|
||||
ProductVariantInventoryService,
|
||||
ProductVariantService,
|
||||
} = require("@medusajs/medusa")
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
|
||||
const {
|
||||
ProductVariantInventoryService,
|
||||
ProductVariantService,
|
||||
} = require("@medusajs/medusa")
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
|
||||
const {
|
||||
ProductVariantInventoryService,
|
||||
ProductVariantService,
|
||||
} = require("@medusajs/medusa")
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../factories")
|
||||
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
@@ -68,6 +65,7 @@ describe("Create Variant", () => {
|
||||
{
|
||||
id: productId,
|
||||
status: "published",
|
||||
sales_channels: [],
|
||||
variants: [{ id: variantId }],
|
||||
},
|
||||
100
|
||||
@@ -135,6 +133,7 @@ describe("Create Variant", () => {
|
||||
{
|
||||
id: `${productId}-1`,
|
||||
status: "published",
|
||||
sales_channels: [],
|
||||
variants: [
|
||||
{
|
||||
id: `${variantId}-1`,
|
||||
@@ -150,6 +149,7 @@ describe("Create Variant", () => {
|
||||
id: `${productId}-2`,
|
||||
status: "published",
|
||||
variants: [{ id: `${variantId}-2`, manage_inventory: true }],
|
||||
sales_channels: [],
|
||||
},
|
||||
102
|
||||
)
|
||||
@@ -158,6 +158,7 @@ describe("Create Variant", () => {
|
||||
{
|
||||
id: `${productId}-3`,
|
||||
status: "published",
|
||||
sales_channels: [],
|
||||
variants: [
|
||||
{
|
||||
id: `${variantId}-3`,
|
||||
@@ -180,6 +181,7 @@ describe("Create Variant", () => {
|
||||
{
|
||||
id: `${productId}-4`,
|
||||
status: "published",
|
||||
sales_channels: [],
|
||||
variants: [
|
||||
{
|
||||
id: `${variantId}-4`,
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
|
||||
const {
|
||||
ProductVariantInventoryService,
|
||||
ProductVariantService,
|
||||
} = require("@medusajs/medusa")
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
const { simpleProductFactory } = require("../../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../factories")
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
describe("List Variants", () => {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../helpers/use-api")
|
||||
const {
|
||||
bootstrapApp,
|
||||
} = require("../../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
@@ -12,8 +14,8 @@ const {
|
||||
simpleProductFactory,
|
||||
simpleOrderFactory,
|
||||
simpleRegionFactory,
|
||||
} = require("../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../api/factories")
|
||||
} = require("../../../../factories")
|
||||
const { simpleSalesChannelFactory } = require("../../../../factories")
|
||||
const adminHeaders = { headers: { Authorization: "Bearer test_token" } }
|
||||
|
||||
describe("Inventory Items endpoints", () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const {
|
||||
simpleProductVariantFactory,
|
||||
simpleProductFactory,
|
||||
} = require("../../factories")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
const { simpleProductFactory } = require("../../../factories")
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
|
||||
+68
-68
@@ -47,7 +47,7 @@ Object {
|
||||
"should_merge": true,
|
||||
"swap_id": null,
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
"variant": Object {
|
||||
@@ -87,7 +87,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -95,7 +95,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -112,7 +112,7 @@ Object {
|
||||
"region_id": "test-region",
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -120,12 +120,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -204,7 +204,7 @@ Object {
|
||||
"should_merge": true,
|
||||
"swap_id": null,
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
"variant": Object {
|
||||
@@ -244,7 +244,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -252,7 +252,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -269,7 +269,7 @@ Object {
|
||||
"region_id": "test-region",
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -277,12 +277,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -336,7 +336,7 @@ Object {
|
||||
},
|
||||
],
|
||||
"thumbnail": null,
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"totals": Object {
|
||||
"discount_total": 0,
|
||||
"original_tax_total": 200,
|
||||
@@ -399,7 +399,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -407,7 +407,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -478,7 +478,7 @@ Object {
|
||||
],
|
||||
"tax_total": 400,
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"total": 2400,
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
@@ -519,7 +519,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -527,7 +527,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -590,7 +590,7 @@ Object {
|
||||
],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -598,12 +598,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -657,7 +657,7 @@ Object {
|
||||
},
|
||||
],
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
"variant": Object {
|
||||
@@ -697,7 +697,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -705,7 +705,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -756,12 +756,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"deleted_at": null,
|
||||
"email": "test@testson.com",
|
||||
"first_name": null,
|
||||
"has_account": false,
|
||||
"first_name": "Lonzo",
|
||||
"has_account": true,
|
||||
"id": Any<String>,
|
||||
"last_name": null,
|
||||
"last_name": "Kemmer",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"phone": "499-811-0832",
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
"customer_id": Any<String>,
|
||||
@@ -824,7 +824,7 @@ Object {
|
||||
],
|
||||
"tax_total": 400,
|
||||
"thumbnail": null,
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Handcrafted Frozen Tuna",
|
||||
"total": 2400,
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
@@ -983,12 +983,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"deleted_at": null,
|
||||
"email": "test@testson.com",
|
||||
"first_name": null,
|
||||
"has_account": false,
|
||||
"first_name": "Reba",
|
||||
"has_account": true,
|
||||
"id": Any<String>,
|
||||
"last_name": null,
|
||||
"last_name": "Waelchi",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"phone": "1-308-426-4696",
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
"customer_id": Any<String>,
|
||||
@@ -1052,7 +1052,7 @@ Object {
|
||||
],
|
||||
"tax_total": 400,
|
||||
"thumbnail": null,
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"total": 2400,
|
||||
"totals": Object {
|
||||
"discount_total": 0,
|
||||
@@ -1116,7 +1116,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -1124,7 +1124,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -1160,7 +1160,7 @@ Object {
|
||||
"returns": Array [],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -1168,12 +1168,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -1235,12 +1235,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"deleted_at": null,
|
||||
"email": "test@testson.com",
|
||||
"first_name": null,
|
||||
"has_account": false,
|
||||
"first_name": "Reba",
|
||||
"has_account": true,
|
||||
"id": Any<String>,
|
||||
"last_name": null,
|
||||
"last_name": "Waelchi",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"phone": "1-308-426-4696",
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
"customer_id": Any<String>,
|
||||
@@ -1324,7 +1324,7 @@ Object {
|
||||
],
|
||||
"tax_total": 400,
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"total": 2400,
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
@@ -1365,7 +1365,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -1373,7 +1373,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -1409,7 +1409,7 @@ Object {
|
||||
"returns": Array [],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -1417,12 +1417,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -1511,7 +1511,7 @@ Object {
|
||||
},
|
||||
],
|
||||
"thumbnail": null,
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"totals": Object {
|
||||
"discount_total": 0,
|
||||
"original_tax_total": 200,
|
||||
@@ -1574,7 +1574,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -1582,7 +1582,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -1653,7 +1653,7 @@ Object {
|
||||
],
|
||||
"tax_total": 400,
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"total": 2400,
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
@@ -1694,7 +1694,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -1702,7 +1702,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -1765,7 +1765,7 @@ Object {
|
||||
],
|
||||
"sales_channel_id": null,
|
||||
"shipping_address": Object {
|
||||
"address_1": "84185 Lindsey Centers",
|
||||
"address_1": "1850 Corine Tunnel",
|
||||
"address_2": null,
|
||||
"city": null,
|
||||
"company": null,
|
||||
@@ -1773,12 +1773,12 @@ Object {
|
||||
"created_at": Any<Date>,
|
||||
"customer_id": null,
|
||||
"deleted_at": null,
|
||||
"first_name": "Chyna",
|
||||
"first_name": "Cornell",
|
||||
"id": Any<String>,
|
||||
"last_name": "Osinski",
|
||||
"last_name": "Shanahan",
|
||||
"metadata": null,
|
||||
"phone": null,
|
||||
"postal_code": "51510",
|
||||
"postal_code": "15102-3998",
|
||||
"province": null,
|
||||
"updated_at": Any<Date>,
|
||||
},
|
||||
@@ -1832,7 +1832,7 @@ Object {
|
||||
},
|
||||
],
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Incredible Plastic Mouse",
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
"variant": Object {
|
||||
@@ -1872,7 +1872,7 @@ Object {
|
||||
"status": "draft",
|
||||
"subtitle": null,
|
||||
"thumbnail": null,
|
||||
"title": "Awesome Metal Ball",
|
||||
"title": "Gorgeous Cotton Table",
|
||||
"type_id": null,
|
||||
"updated_at": Any<Date>,
|
||||
"weight": null,
|
||||
@@ -1880,7 +1880,7 @@ Object {
|
||||
},
|
||||
"product_id": "test-product",
|
||||
"sku": null,
|
||||
"title": "Practical Granite Pizza",
|
||||
"title": "Refined Wooden Chair",
|
||||
"upc": null,
|
||||
"updated_at": Any<Date>,
|
||||
"variant_rank": 0,
|
||||
@@ -2103,7 +2103,7 @@ Object {
|
||||
},
|
||||
],
|
||||
"thumbnail": "",
|
||||
"title": "Intelligent Plastic Chips",
|
||||
"title": "Handcrafted Frozen Tuna",
|
||||
"unit_price": 1000,
|
||||
"updated_at": Any<Date>,
|
||||
"variant": Object {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../helpers/use-api")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(10000)
|
||||
|
||||
@@ -13,7 +13,7 @@ const {
|
||||
simpleStoreFactory,
|
||||
simpleProductFactory,
|
||||
simpleShippingOptionFactory,
|
||||
} = require("../../factories")
|
||||
} = require("../../../factories")
|
||||
|
||||
describe("medusa-plugin-sendgrid", () => {
|
||||
let appContainer
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../helpers/use-api")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../helpers/use-api")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../helpers/use-api")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
const { setPort, useApi } = require("../../../environment-helpers/use-api")
|
||||
|
||||
const adminSeeder = require("../../helpers/admin-seeder")
|
||||
const adminSeeder = require("../../../helpers/admin-seeder")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require("path")
|
||||
|
||||
const { bootstrapApp } = require("../../../helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../helpers/use-db")
|
||||
const { bootstrapApp } = require("../../../environment-helpers/bootstrap-app")
|
||||
const { initDb, useDb } = require("../../../environment-helpers/use-db")
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user