Skip to content

Comments

Create mocks for the entire Customer Account extension API#3905

Open
kumar303 wants to merge 1 commit into02-12-create_mocks_for_the_entire_point-of-sale_extension_apifrom
02-12-create_mocks_for_the_entire_customer_account_extension_api
Open

Create mocks for the entire Customer Account extension API#3905
kumar303 wants to merge 1 commit into02-12-create_mocks_for_the_entire_point-of-sale_extension_apifrom
02-12-create_mocks_for_the_entire_customer_account_extension_api

Conversation

@kumar303
Copy link
Contributor

@kumar303 kumar303 commented Feb 12, 2026

Follow up to #3899 that adds a complete, type-safe mock of the Customer Account extension API

👁️ How to review this PR

Copy link
Contributor Author

kumar303 commented Feb 12, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 8c15ddb to 4a0e80d Compare February 12, 2026 17:57
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 3e06b36 to 072992f Compare February 12, 2026 19:44
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 4a0e80d to 27fe3a8 Compare February 12, 2026 19:44
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 072992f to 34763c2 Compare February 13, 2026 11:46
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 27fe3a8 to 8fccf50 Compare February 13, 2026 11:46
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 34763c2 to c11b76b Compare February 13, 2026 11:58
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 8fccf50 to b6b83e9 Compare February 13, 2026 11:58
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from c11b76b to bb5b1ed Compare February 13, 2026 12:20
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch 3 times, most recently from bab7729 to a303042 Compare February 13, 2026 14:57
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch 2 times, most recently from 344b671 to af00386 Compare February 13, 2026 15:11
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from a303042 to 2db9df6 Compare February 13, 2026 15:11
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from af00386 to 7049f9e Compare February 13, 2026 15:33
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch 2 times, most recently from 6e15cd7 to 83b81e0 Compare February 13, 2026 15:34
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 7049f9e to 1a6144c Compare February 13, 2026 15:34
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 83b81e0 to 69f7238 Compare February 13, 2026 16:14
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 1a6144c to 62487cd Compare February 13, 2026 16:14
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 69f7238 to bb90420 Compare February 13, 2026 16:24
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 62487cd to 4fd668d Compare February 13, 2026 16:24
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from bb90420 to 9707ec1 Compare February 13, 2026 22:04
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 4fd668d to d8892b1 Compare February 13, 2026 22:58
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 9707ec1 to 2b029e3 Compare February 13, 2026 22:58
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch 2 times, most recently from ed2acf4 to 9c42619 Compare February 23, 2026 17:34
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch 2 times, most recently from 6588884 to dc785e2 Compare February 24, 2026 10:12
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 9c42619 to b1d8f34 Compare February 24, 2026 10:12
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from dc785e2 to ca3a20d Compare February 24, 2026 10:14
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch 2 times, most recently from 49e571c to 31b4fbd Compare February 24, 2026 10:49
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from ca3a20d to 6afbc5a Compare February 24, 2026 10:49
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 31b4fbd to cc4dd82 Compare February 24, 2026 11:14
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 6afbc5a to e04bdfe Compare February 24, 2026 11:14
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from cc4dd82 to d058148 Compare February 24, 2026 11:23
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from e04bdfe to 4c9b881 Compare February 24, 2026 11:23
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from d058148 to e592271 Compare February 24, 2026 11:29
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 4c9b881 to 1ab00cd Compare February 24, 2026 11:29
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from e592271 to 776e604 Compare February 24, 2026 11:53
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 1ab00cd to 724d295 Compare February 24, 2026 11:53
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 776e604 to d619193 Compare February 24, 2026 14:01
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 724d295 to 2364cea Compare February 24, 2026 14:01
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from d619193 to ec9fbb4 Compare February 24, 2026 14:11
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 2364cea to 6ec4c50 Compare February 24, 2026 14:11
@kumar303 kumar303 marked this pull request as ready for review February 24, 2026 14:27

const customerAccountMockFactories: CustomerAccountMockFactory = {
// StandardApi only
'customer-account.page.render': createStandardApiProperties,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add the navigation api? https://shopify.dev/docs/api/customer-account-ui-extensions/latest/apis/navigation

navigate is available in all targets, full page extensions have more properties available

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah. Is this available for Admin, too? I can't tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a mock for all surfaces (on the base branch). Good call, thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all surfaces? 😅 Checkout doesn't have it, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if at least two surfaces include it then I think it's good to include it everywhere. We could make navigate() throw an error if the extension under test is in an unsupported target.

@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 6ec4c50 to 32fb2a4 Compare February 24, 2026 15:35
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from ec9fbb4 to 44a456a Compare February 24, 2026 15:35
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_customer_account_extension_api branch from 44a456a to f7c9ffa Compare February 24, 2026 16:41
@kumar303 kumar303 force-pushed the 02-12-create_mocks_for_the_entire_point-of-sale_extension_api branch from 32fb2a4 to a026d49 Compare February 24, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants