-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Conversation
There was a problem hiding this 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 ! 😊👍
landscapeValue() | ||
.selectedModules() | ||
.forEach(module => { | ||
landscape.value.loaded(landscapeValue().toggle(module)); | ||
}); | ||
|
There was a problem hiding this comment.
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 👌
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @qmonmert 👌
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); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍👍👌
Fix #10660