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

Fix: preset modules selected and deselected #10663

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Conversation

qmonmert
Copy link
Contributor

Fix #10660

@qmonmert qmonmert marked this pull request as ready for review August 24, 2024 16:07
renanfranca
renanfranca previously approved these changes Aug 24, 2024
Copy link
Contributor

@renanfranca renanfranca left a comment

Choose a reason for hiding this comment

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

Thanks for your work @qmonmert ! 😊👍

Comment on lines +414 to +419
landscapeValue()
.selectedModules()
.forEach(module => {
landscape.value.loaded(landscapeValue().toggle(module));
});

Copy link
Contributor

Choose a reason for hiding this comment

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

@qmonmert, if you could create a test for this, it would be really nice 👌

Copy link
Member

Choose a reason for hiding this comment

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

yes, there should be a test to prove our initial code was with a bug

@qmonmert
Copy link
Contributor Author

@renanfranca @pascalgrimaud
image

Copy link
Contributor

@renanfranca renanfranca left a comment

Choose a reason for hiding this comment

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

Thanks @qmonmert 👌

Comment on lines +1122 to +1137
it('should select modules from selected preset when preset option is updated multiple times', async () => {
let { initModuleElement } = await setupAndSelectPreset('init-prettier');

let classes = initModuleElement.classes();
['-selected', '-compacted'].forEach(expectedClass => {
expect(classes).toContain(expectedClass);
});

({ initModuleElement } = await setupAndSelectPreset('init-typescript'));

classes = initModuleElement.classes();
['-selected', '-compacted'].forEach(expectedClass => {
expect(classes).toContain(expectedClass);
});
});

Copy link
Contributor

Choose a reason for hiding this comment

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

👍👍👍👌

@murdos murdos merged commit b15920f into jhipster:main Aug 24, 2024
34 checks passed
@pascalgrimaud pascalgrimaud added the area: bug 🐛 Something isn't working label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preset: modules selected and deselected
4 participants