Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/commands/ui-bundle/dev.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('ui-bundle dev NUTs — Tier 2 CLI validation', () => {
// Discovery treats this as ambiguous intent and rejects it.
it('should error on --name conflict when inside a different uiBundle', () => {
const projectDir = createProjectWithUiBundle(session, 'nameConflict', 'appA');
execSync('sf ui-bundle generate --name appB', {
execSync('sf template generate ui-bundle --name appB', {
cwd: projectDir,
stdio: 'pipe',
env: { ...process.env, HOME: REAL_HOME, USERPROFILE: REAL_HOME },
Expand Down
8 changes: 4 additions & 4 deletions test/commands/ui-bundle/helpers/uiBundleProjectUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { UI_BUNDLES_FOLDER } from '../../../../src/config/uiBundleDiscovery.js';

/**
* Real home directory captured at module load, before TestSession overrides process.env.HOME.
* Used when running `sf ui-bundle generate` so the CLI finds linked plugin-templates
* Used when running `sf template generate ui-bundle` so the CLI finds linked plugin-templates
* (TestSession sets HOME to a temp dir, which hides linked plugins).
*/
export const REAL_HOME = homedir();
Expand Down Expand Up @@ -98,12 +98,12 @@ export function createProject(session: TestSession, name: string): string {
}

/**
* Run `sf project generate` then `sf ui-bundle generate --name <uiBundleName>` inside
* Run `sf project generate` then `sf template generate ui-bundle --name <uiBundleName>` inside
* the project. Returns the absolute path to the generated project root.
*/
export function createProjectWithUiBundle(session: TestSession, projectName: string, uiBundleName: string): string {
const projectDir = createProject(session, projectName);
execSync(`sf ui-bundle generate --name ${uiBundleName}`, {
execSync(`sf template generate ui-bundle --name ${uiBundleName}`, {
cwd: projectDir,
stdio: 'pipe',
env: { ...process.env, HOME: REAL_HOME, USERPROFILE: REAL_HOME },
Expand All @@ -122,7 +122,7 @@ export function createProjectWithMultipleUiBundles(
): string {
const projectDir = createProject(session, projectName);
for (const name of uiBundleNames) {
execSync(`sf ui-bundle generate --name ${name}`, {
execSync(`sf template generate ui-bundle --name ${name}`, {
cwd: projectDir,
stdio: 'pipe',
env: { ...process.env, HOME: REAL_HOME, USERPROFILE: REAL_HOME },
Expand Down
Loading