fix script revert activating recommendation level
Reverting any single of the scripts from standard recommendation pool shows "Standard" selection as selected which is wrong. This commit fixes it, refactors selection handling in a separate class and it also adds missing tests. It removes UserSelection.totalSelected propertty in favor of using UserSelection.selectedScripts.length to provide unified way of accessing the information.
This commit is contained in:
@@ -152,7 +152,6 @@ describe('UserSelection', () => {
|
||||
// act
|
||||
sut.removeAllInCategory(categoryId);
|
||||
// assert
|
||||
expect(sut.totalSelected).to.equal(0);
|
||||
expect(sut.selectedScripts.length).to.equal(0);
|
||||
});
|
||||
it('removes existing some exists', () => {
|
||||
@@ -167,7 +166,6 @@ describe('UserSelection', () => {
|
||||
// act
|
||||
sut.removeAllInCategory(categoryId);
|
||||
// assert
|
||||
expect(sut.totalSelected).to.equal(0);
|
||||
expect(sut.selectedScripts.length).to.equal(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user