UTAM page object artefacts are deployed even though they are in .forceignore

Issue #2212 resolved
Phil W created an issue

We recently adopted UTAM for automation testing and have been creating UTAM page object JSON files and putting them "next to" the LWC components that they relate to, in a similar manner to how we do this with Jest tests. The structure is like:

Path Purpose
lwc/theLWC/__tests__/... For Jest tests. Works fine.
lwc/theLWC/__utam__/… For UTAM page object files. Causes deployment issues.

This is what this might look like in the project structure:

We have these files listed in our .forceignore, so SFDX commands work fine for both Jest and UTAM artefacts:

# LWC Jest
**/__tests__/**

# UTAM JSON Files
**/__utam__/**

However, if we have "Deploy on save" set then it seems that IC tries to deploy the UTAM artefacts that are, of course, undeployable files. The same holds true for the "Deploy Metadata" or "Deploy Modified Metadata" commands.

Comments (4)

  1. Scott Wells repo owner

    Okay, today I committed a full implementation of first-class UTAM JSON support for LWC components. They’re now treated like Jest tests from a deployment/retrieval standpoint, and they also show up in the tabbed editor, go to related list, etc. When editing one of those files, the IDE also checks whether the correct JSON schema mapping is already configured or not and, if not, helps to add the mapping.

    This should all be in next week’s build assuming that the Winter ‘23 updates go smoothly/quickly. If not, it’ll be in the following week’s build.

  2. Log in to comment