Skip to content

BMU-2640/product tailoring set images action fix#53

Merged
kafis merged 3 commits into
mainfrom
BMU-2640/product-tailoring-set-images-action-fix
May 20, 2026
Merged

BMU-2640/product tailoring set images action fix#53
kafis merged 3 commits into
mainfrom
BMU-2640/product-tailoring-set-images-action-fix

Conversation

@kafis
Copy link
Copy Markdown
Contributor

@kafis kafis commented May 20, 2026

test('should build `setImage` action with undefined images, if images become undefined', () => {
      const before = {
        variants: [
          {
            id: 1,
            images: [],
            assets: [],
          },
          {
            id: 2,
            images: [
              { url: '//newimage-1.jpg', dimensions: { w: 400, h: 300 } },
            ],
            assets: [],
          },
        ],
      };
      const now = {
        variants: [
          {
            id: 1,
            assets: [],
          }, {
          id: 2,
            assets: []
          }
        ],
      };

      const actions = productTailoringSync.buildActions(now, before);
      expect(actions).toEqual([
        {
          action: 'setImages',
          variantId: 1,
        },
        {
          action: 'setImages',
          variantId: 2,
        },
      ]);
    })
    

@kafis kafis requested a review from a team as a code owner May 20, 2026 08:17
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 85b9c76

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@commercetools/sync-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kafis kafis requested a review from a team May 20, 2026 08:28
@kafis kafis merged commit 3f473a0 into main May 20, 2026
10 checks passed
@ct-changesets ct-changesets Bot mentioned this pull request May 20, 2026
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