diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index caf1f416ff7..84c4f7cb2b1 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -185,10 +185,11 @@ describe('getStoreInfo', () => { id: 'gid://shopify/Shop/123', displayName: 'Lavender Candles', subdomain: SHOP, - adminUrl: 'https://admin.shopify.com/store/shop', accessUrl: 'https://app.shopify.com/auth/preview-store?token=fresh-access-token', saveUrl: 'https://admin.shopify.com/store-transfer/accept/claim-token', }) + // The admin URL doesn't resolve for an unclaimed preview store, so it's deliberately omitted. + expect(result.adminUrl).toBeUndefined() }) test('prefers BP when store auth exists and BP can resolve the store', async () => { diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 7e0b95b2d9f..3b90798dafb 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -242,10 +242,10 @@ function buildPreviewStoreResult(args: { previewStoreUrls: PreviewStoreUrls }): StoreInfoResult { const {store, previewSession, previewStoreUrls} = args + // The admin URL is intentionally omitted: it doesn't resolve for an unclaimed preview store yet. const fields: Partial = { id: buildShopGid(previewSession.preview.shopId), displayName: previewSession.preview.name, - adminUrl: buildAdminUrl(extractMyshopifyHandle(store)), accessUrl: previewStoreUrls.accessUrl, saveUrl: previewStoreUrls.saveUrl, }