Skip to content

"Create Apex Unit Test Class" command no longer prompts for directory #7057

@klouf-threshold

Description

@klouf-threshold

Summary

"Create Apex Unit Test Class" command no longer prompts for the directory to save the newly created files to, which it previously did and which it's counterpart command "Create Apex Class" does.

Steps To Reproduce:

  1. Run "Create Apex Unit Test Class" command
  2. Enter Apex Class name
  3. Select Template

Expected result

Command prompts for directory to place new files in

Actual result

Command does not prompt for directory, and instead always creates files in default folder

Additional information

This is a recent change within the past week or so, not entirely sure if it was made in the last release or the previous one.

Also, with the previous (desired) behavior the pre-populated suggested directories seemed to have a specific directory pattern that it looked for, which unfortunately did not capture the directory structure that we use (force-app/main/tests/classes). Not sure what the pattern that it matches was, but it seemed strange that it didn't match on ours despite it being IMO a pretty sensible naming structure. Would be nice if this could be tweaked to be a little more broad-searching for test folders. Not a huge deal, worst case we could update our naming/structure to be more "standard".

Salesforce Extension Version in VS Code: 66.2.3

Salesforce CLI Version: 2.127.2

OS and version: macOS Tahoe 26.3.1

VS Code version: 1.112.0

Most recent version of the extensions where this was working: Unsure, no more than a couple versions back

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions