mirror of
https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git
synced 2026-11-19 00:30:30 +00:00
Add ZCode as a first-class install target so the skill can be installed with `uipro init --ai zcode` (workspace) or `uipro init --ai zcode --global` (~/.zcode/skills/), and removed via `uipro uninstall` auto-detection. - new platform config src/ui-ux-pro-max/templates/platforms/zcode.json (synced to cli/assets via sync:assets) - register 'zcode' in AIType union, AI_TYPES, AI_FOLDERS, AI_TO_PLATFORM - detect .zcode workspace directories and describe the platform in CLI prompts - cover zcode in the dry-run and template-script-paths e2e specs - document ZCode in README install/usage sections Co-authored-by: Dmso <22094486+dmsobtl@users.noreply.github.com>
54 lines
1.9 KiB
TypeScript
54 lines
1.9 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
import { mkdtemp, readdir } from 'node:fs/promises';
|
|
import { tmpdir } from 'node:os';
|
|
import { join } from 'node:path';
|
|
import {
|
|
planAllPlatformInstallActions,
|
|
planPlatformInstallActions,
|
|
} from '../../src/utils/template.js';
|
|
|
|
test('dry-run plan lists the install actions for one platform', async () => {
|
|
const scratch = await mkdtemp(join(tmpdir(), 'uipro-dry-run-'));
|
|
|
|
const actions = await planPlatformInstallActions(scratch, 'claude');
|
|
|
|
const joined = actions.join('\n');
|
|
expect(joined).toContain(
|
|
join(scratch, '.claude', 'skills', 'ui-ux-pro-max', 'SKILL.md')
|
|
);
|
|
expect(joined).toContain('Would copy data + scripts:');
|
|
expect(joined).toContain('Would copy 6 sub-skills (');
|
|
});
|
|
|
|
test('dry-run plan writes nothing to the target directory', async () => {
|
|
const scratch = await mkdtemp(join(tmpdir(), 'uipro-dry-run-write-'));
|
|
const before = await readdir(scratch);
|
|
|
|
await planPlatformInstallActions(scratch, 'claude');
|
|
await planAllPlatformInstallActions(scratch);
|
|
|
|
expect(await readdir(scratch)).toEqual(before);
|
|
});
|
|
|
|
test('dry-run plan supports the zcode platform layout', async () => {
|
|
const scratch = await mkdtemp(join(tmpdir(), 'uipro-dry-run-zcode-'));
|
|
|
|
const actions = await planPlatformInstallActions(scratch, 'zcode');
|
|
|
|
const joined = actions.join('\n');
|
|
expect(joined).toContain(
|
|
join(scratch, '.zcode', 'skills', 'ui-ux-pro-max', 'SKILL.md')
|
|
);
|
|
expect(joined).toContain('Would copy data + scripts:');
|
|
expect(joined).toContain('Would copy 6 sub-skills (');
|
|
});
|
|
|
|
test('dry-run plan for all platforms covers every unique layout', async () => {
|
|
const scratch = await mkdtemp(join(tmpdir(), 'uipro-dry-run-all-'));
|
|
|
|
const planned = await planAllPlatformInstallActions(scratch);
|
|
|
|
expect(planned.size).toBeGreaterThan(1);
|
|
expect(planned.get('claude')!.length).toBeGreaterThan(0);
|
|
});
|