chore: install dependencies and verify build
This commit is contained in:
parent
807ac75be9
commit
87ca7888be
|
|
@ -11,7 +11,7 @@ const shopify = shopifyApp({
|
||||||
appUrl: process.env.SHOPIFY_APP_URL || "",
|
appUrl: process.env.SHOPIFY_APP_URL || "",
|
||||||
authPathPrefix: "/auth",
|
authPathPrefix: "/auth",
|
||||||
sessionStorage: new PrismaSessionStorage(db),
|
sessionStorage: new PrismaSessionStorage(db),
|
||||||
distribution: AppDistribution.Custom,
|
distribution: AppDistribution.SingleMerchant,
|
||||||
future: {
|
future: {
|
||||||
unstable_newEmbeddedAuthStrategy: true,
|
unstable_newEmbeddedAuthStrategy: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -20,7 +20,8 @@
|
||||||
"@shopify/polaris": "^12.27.0",
|
"@shopify/polaris": "^12.27.0",
|
||||||
"@shopify/shopify-app-remix": "^3.8.2",
|
"@shopify/shopify-app-remix": "^3.8.2",
|
||||||
"@shopify/shopify-app-session-storage-prisma": "^6.0.0",
|
"@shopify/shopify-app-session-storage-prisma": "^6.0.0",
|
||||||
"@shopify/ui-extensions-react": "^2026.1.0",
|
"@shopify/ui-extensions": "2025.8.0",
|
||||||
|
"@shopify/ui-extensions-react": "^2026.0.0",
|
||||||
"isbot": "^5.1.28",
|
"isbot": "^5.1.28",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,12 @@ describe("activity flow", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("pushes order_end with configured shop and no line items", async () => {
|
test("pushes order_end with configured shop and no line items", async () => {
|
||||||
let captured: PushPayload | null = null;
|
const capturedPayloads: PushPayload[] = [];
|
||||||
const result = await runActivityCheck(
|
const result = await runActivityCheck(
|
||||||
{ shop: "demo.myshopify.com", orderId: "gid://shopify/Order/123", orderNumber: "#1001", locale: "zh-CN" },
|
{ shop: "demo.myshopify.com", orderId: "gid://shopify/Order/123", orderNumber: "#1001", locale: "zh-CN" },
|
||||||
baseDeps({
|
baseDeps({
|
||||||
callPush: async (_config, payload) => {
|
callPush: async (_config, payload) => {
|
||||||
captured = payload;
|
capturedPayloads.push(payload);
|
||||||
return {
|
return {
|
||||||
httpOk: true,
|
httpOk: true,
|
||||||
status: 200,
|
status: 200,
|
||||||
|
|
@ -110,6 +110,8 @@ describe("activity flow", () => {
|
||||||
redirectUrl: "https://activity.example.com",
|
redirectUrl: "https://activity.example.com",
|
||||||
buttonText: "领取奖励",
|
buttonText: "领取奖励",
|
||||||
});
|
});
|
||||||
|
expect(capturedPayloads).toHaveLength(1);
|
||||||
|
const captured = capturedPayloads[0];
|
||||||
expect(captured).toMatchObject({
|
expect(captured).toMatchObject({
|
||||||
activity_id: 12,
|
activity_id: 12,
|
||||||
event_type: "order_end",
|
event_type: "order_end",
|
||||||
|
|
@ -124,8 +126,8 @@ describe("activity flow", () => {
|
||||||
order_number: "#1001",
|
order_number: "#1001",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
expect(captured?.properties).not.toHaveProperty("lineItems");
|
expect(captured.properties).not.toHaveProperty("lineItems");
|
||||||
expect(captured?.event_id).toMatch(/^[0-9a-f-]{36}$/);
|
expect(captured.event_id).toMatch(/^[0-9a-f-]{36}$/);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("returns false when push api fails", async () => {
|
test("returns false when push api fails", async () => {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue