Skip to content

Commit 6e6a8b1

Browse files
committed
fixed cli e2e test
1 parent 8953ab8 commit 6e6a8b1

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
"release": "pnpm release.prepare && pnpm release.setroot && pnpm release.publish && pnpm release.resetroot",
3030
"release.publish": "changeset publish",
3131
"release.resetroot": "cp dist/pnpm-workspace.yaml pnpm-workspace.yaml",
32-
"release.e2e": "pnpm release.prepare && pnpm release.setroot && pnpm -r exec pnpm version patch && pnpm -r publish --tag e2e --no-git-checks && pnpm release.resetroot",
32+
"release.e2e": "pnpm release.prepare && pnpm release.setroot && pnpm -r exec pnpm version patch && pnpm -r exec pnpm publish --tag e2e --no-git-checks && pnpm release.resetroot",
3333
"test.cli": "NODE_OPTIONS=--experimental-vm-modules nx test cli",
34+
"test.cli.e2e": "nx e2e cli-e2e",
3435
"test.headless": "nx component-test headless --skip-nx-cache",
3536
"test.visual.headless": "nx visual-test headless",
3637
"test.pw.headless": "nx e2e headless",
@@ -147,7 +148,7 @@
147148
"includedScripts": []
148149
},
149150
"volta": {
150-
"node": "20.9.0",
151+
"node": "22.7.0",
151152
"pnpm": "9.7.0"
152153
}
153154
}

packages/cli-e2e/src/cli.smoke.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Qwik UI CLI Smoke test', () => {
2323

2424
it('should be installed and add the button file', () => {
2525
execSync(
26-
'npx -y qwik-ui@e2e init --e2e --projectRoot / --uiComponentsPath "src/components/ui" --rootCssPath "src/global.css" --installTailwind --style "simple" --components=button',
26+
'npx -y qwik-ui@e2e init --e2e --projectRoot ./ --uiComponentsPath "src/components/ui" --rootCssPath "src/global.css" --installTailwind --style "simple" --components=button',
2727
{
2828
cwd: projectDirectory,
2929
env: process.env,

packages/cli/bin/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async function handleInit() {
185185

186186
if (installTailwind) {
187187
execSync(
188-
`${getPackageManagerCommand().exec} qwik add tailwind --skipConfirmation=true`,
188+
`${getPackageManagerCommand().exec} qwik add tailwind --skipConfirmation=true --projectDir=${config.projectRoot}`,
189189
{
190190
stdio: 'inherit',
191191
cwd: config.projectRoot,
@@ -432,9 +432,9 @@ Options: [${possibleComponentNames.join(', ')}]`,
432432
coerce: (components) => componentTypesFromString(components),
433433
})
434434
.option('projectRoot', {
435-
description: 'The root of the project (default: "/")',
435+
description: 'The root of the project (default: "./")',
436436
type: 'string',
437-
default: '/',
437+
default: './',
438438
}),
439439
handler: () => {},
440440
};
@@ -450,8 +450,8 @@ Options: [${possibleComponentNames.join(', ')}]`,
450450
if (!projectRoot && !args['projectRoot']) {
451451
projectRoot = cancelable(
452452
await text({
453-
message: cyan('Specify the root of the project (leave empty for "/")'),
454-
initialValue: '/',
453+
message: cyan('Specify the root of the project (leave empty for "./")'),
454+
initialValue: './',
455455
}),
456456
);
457457
}

0 commit comments

Comments
 (0)