Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const result = {
}

describe('preview store create result presenter', () => {
test('writes JSON output with the storefront URL', () => {
test('writes JSON output with the next steps', () => {
writeCreatePreviewStoreResult(result, 'json')

expect(outputResult).toHaveBeenCalledWith(
Expand All @@ -43,7 +43,7 @@ describe('preview store create result presenter', () => {
storefrontUrl: 'https://x12y45z.myshopify.com/?foo=bar',
},
next_steps: [
'Open your store (https://x12y45z.myshopify.com/?foo=bar) to preview the storefront.',
'Use `shopify store open --store x12y45z.myshopify.com` to preview the storefront.',
'Use `shopify store execute --store x12y45z.myshopify.com` to add products, collections, pages, and more.',
'Use `shopify theme pull --store x12y45z.myshopify.com` and `shopify theme push --store x12y45z.myshopify.com` to edit your store design.',
],
Expand All @@ -70,13 +70,8 @@ describe('preview store create result presenter', () => {
list: {
items: [
[
'Open ',
{
link: {
label: 'your store',
url: 'https://x12y45z.myshopify.com/?foo=bar',
},
},
'Use ',
{command: 'shopify store open --store x12y45z.myshopify.com'},
' to preview the storefront.',
],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function serializeAsJson(result: CreatePreviewStoreResult) {
function previewStoreNextSteps(result: CreatePreviewStoreResult): PreviewStoreNextStep[] {
return [
{
json: `Open your store (${result.store.storefrontUrl}) to preview the storefront.`,
text: ['Open ', {link: {label: 'your store', url: result.store.storefrontUrl}}, ' to preview the storefront.'],
json: `Use \`shopify store open --store ${result.store.subdomain}\` to preview the storefront.`,
text: ['Use ', {command: `shopify store open --store ${result.store.subdomain}`}, ' to preview the storefront.'],
},
{
json: `Use \`shopify store execute --store ${result.store.subdomain}\` to add products, collections, pages, and more.`,
Expand Down
Loading