[Shopify] Migrate test mocking from IsTestInProgress to HttpClientHandler#7204
Draft
[Shopify] Migrate test mocking from IsTestInProgress to HttpClientHandler#7204
Conversation
…ientHandler Remove the legacy IsTestInProgress event-based mocking infrastructure from the Shopify Connector and migrate all tests to use the framework-level HttpClientHandler pattern. Production code changes: - Remove IsTestInProgress/SetTestInProgress/GetTestInProgress from ShpfyCommunicationMgt and all if-branches that routed HTTP to events - Delete ShpfyCommunicationEvents codeunit (5 legacy test events) - Remove GetTestInProgress early-exit guards from 5 order/fulfillment codeunits - Remove IsTestInProgress parameter from OnBeforeUploadImage event - Add InputSize > 0 guard in InventoryAPI.ExportStock Test code changes: - Migrate ~40 test codeunits to TestHttpRequestPolicy = BlockOutboundRequests with [HttpClientHandler] procedures and [HandlerFunctions] annotations - Delete 15 legacy subscriber codeunits; strip 2 others to non-HTTP events only - Use Library - Variable Storage for response queue routing in handlers - Standardize initialization: CreateShop + RegisterAccessTokenForShop Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove 35 local Shop variable declarations that shadow codeunit-level Shop - Rename Shop parameters to ShopParam to avoid AA0244 - Convert bare StrSubstNo format strings to Label constants (AA0217) - Fix unassigned DefaultVariantId variable (AA0205) - Remove unused ProductId variables (AA0206) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a0927ba to
6ca6dcb
Compare
…te/onbuyuka/shpfytestmock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IsTestInProgressevent-based mocking infrastructure from the Shopify Connector[HttpClientHandler]pattern withTestHttpRequestPolicy = BlockOutboundRequestsShpfyCommunicationEventscodeunit and 15 legacy subscriber codeunitsProduction code changes
IsTestInProgress/SetTestInProgress/GetTestInProgressfromShpfyCommunicationMgtand allif IsTestInProgressbranchesShpfyCommunicationEvents.Codeunit.al(5 legacy test-only events)GetTestInProgress()early-exit guards from 5 order/fulfillment codeunitsIsTestInProgressparameter fromOnBeforeUploadImageeventInputSize > 0guard inInventoryAPI.ExportStockto skip empty mutationsTest code changes
[HttpClientHandler]withLibrary - Variable Storagefor response queue routingCreateShop()+RegisterAccessTokenForShop()Test plan
Fixes AB#625871
🤖 Generated with Claude Code