Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FUSETOOLS2-2113 - Allows selection of folder when creating projects #1952

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hdamarcelo
Copy link
Contributor

@hdamarcelo hdamarcelo commented Oct 5, 2024

  • Removes "enablement" for the project creation commands because we will be always choosing a folder work with.
  • Project creation commands do not depend on the workspace root anymore and can be used without one.
  • Refactor existing tests to use the additional folder selection dialog.
  • Opens a new VSCode instance in the newly created project's folder.

@hdamarcelo
Copy link
Contributor Author

Peek 2024-10-04 23-49

@hdamarcelo hdamarcelo force-pushed the FUSETOOLS2-2113 branch 3 times, most recently from 7f7f637 to 6b37f60 Compare October 5, 2024 20:22
@@ -37,7 +37,7 @@ import {
} from '../utils/testUtils';
import * as pjson from '../../../package.json';

describe('Create a Camel Project using command', function () {
describe.only('Create a Camel Project using command', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment to not forget to remove the .only when PR is ready

'export',
`--runtime=${runtime}`,
`--gav=${gav}`,
`'--directory=${outputPath}'`]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to double-check the behavior when there is something in the target folder and/or when using the current folder with various version of JBang because there were some issues in the past using this parameter fr another jbang command https://issues.apache.org/jira/browse/CAMEL-21082

Copy link
Contributor Author

@hdamarcelo hdamarcelo Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested more locally and issue you mentioned is only solved for the init subcomand. In this JBang task we are using camel export which cleans the contents of the folder especified in the --directory= option.

camelcomand

Comment on lines 87 to 89
while (await input.isDisplayed()) {
await input.confirm();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why confirming potentially several times?

Comment on lines 83 to 86
await driver.wait(async function () {
input = await InputBox.create();
return input;
}, 30000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using

input = await InputBox.create(30000);

@djelinek
Copy link
Member

could you also please share the gif with Modal asking for continue?

@hdamarcelo
Copy link
Contributor Author

could you also please share the gif with Modal asking for continue?

Peek 2024-10-24 10-07

- Removes "enablement" for the project creation commands because we will
  be always choosing a folder work with.
- Project creation commands do not depend on the workspace root anymore
  and can be used without one.
- Refactor existing tests to use the additional folder selection dialog.
- Adds a modal to confirm the project creation since the 'camel export'
  command can clean the selected output folder.
- Opens a new VSCode instance in the newly created project's folder.

Signed-off-by: Marcelo Henrique Diniz de Araujo <[email protected]>
Copy link

sonarcloud bot commented Oct 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants